Skip to content

Comicvine

ComicvineResource

Bases: Enum

Enum class for Comicvine Resources.

ATTRIBUTE DESCRIPTION
ISSUE

CHARACTER

PUBLISHER

CONCEPT

LOCATION

ORIGIN

POWER

CREATOR

STORY_ARC

VOLUME

ITEM

TEAM

Comicvine

Class with functionality to request Comicvine API endpoints.

PARAMETER DESCRIPTION
api_key

User's API key to access the Comicvine API.

TYPE: str

base_url

Root URL of the Comicvine API.

TYPE: str | None DEFAULT: None

user_agent

Value sent in the User-Agent request header.

TYPE: str | None DEFAULT: None

timeout

Set how long requests will wait for a response (in seconds).

TYPE: float DEFAULT: 20

cache_path

Path to the SQLite cache file. If not provided, a default path will be used under ~/.cache/simyan/cache.sqlite

TYPE: Path | None DEFAULT: None

cache_expiry

Duration for which cached responses are valid. Response cache-headers take precedence.

TYPE: timedelta DEFAULT: timedelta(days=14)

ratelimit_path

Path to the SQLite ratelimit file. If not provided, a default path will be used under ~/.cache/simyan/ratelimits.sqlite

TYPE: Path | None DEFAULT: None

Source code in simyan/comicvine.py
Python
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
def __init__(
    self,
    api_key: str,
    base_url: str | None = None,
    user_agent: str | None = None,
    timeout: float = 20,
    cache_path: Path | None = None,
    cache_expiry: timedelta = timedelta(days=14),
    ratelimit_path: Path | None = None,
):
    self._base_url = base_url or "https://comicvine.gamespot.com/api"
    self._session = CachedLimiterSession(
        backend=SQLiteCache(
            db_path=cache_path or (get_cache_root() / "cache.sqlite"), serializer="json"
        ),
        expire_after=cache_expiry,
        cache_control=cache_expiry != NEVER_EXPIRE,
        ignored_parameters=["api_key"],
        per_second=1,
        per_hour=200,
        max_delay=timeout * 2,
        bucket_class=SQLiteBucket,
        bucket_kwargs={"path": ratelimit_path or (get_cache_root() / "ratelimits.sqlite")},
        per_host=False,
        bucket_name="comicvine",
    )
    self._session.headers.update(
        {
            "Accept": "application/json",
            "User-Agent": user_agent
            or f"Simyan/{__version__} ({platform.system()}: {platform.release()}; Python v{platform.python_version()})",  # noqa: E501
        }
    )
    self._session.params.update({"api_key": api_key, "format": "json"})
    self._timeout = timeout

Methods:

get_character

Request a Character using its id.

PARAMETER DESCRIPTION
character_id

The Character id.

TYPE: int

RETURNS DESCRIPTION
Character

A Character object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
def get_character(self, character_id: int) -> Character:
    """Request a Character using its id.

    Args:
        character_id: The Character id.

    Returns:
        A Character object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.CHARACTER, id_=character_id)

get_concept

Request a Concept using its id.

PARAMETER DESCRIPTION
concept_id

The Concept id.

TYPE: int

RETURNS DESCRIPTION
Concept

A Concept object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
def get_concept(self, concept_id: int) -> Concept:
    """Request a Concept using its id.

    Args:
        concept_id: The Concept id.

    Returns:
        A Concept object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.CONCEPT, id_=concept_id)

get_creator

Request a Creator using its id.

PARAMETER DESCRIPTION
creator_id

The Creator id.

TYPE: int

RETURNS DESCRIPTION
Creator

A Creator object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
def get_creator(self, creator_id: int) -> Creator:
    """Request a Creator using its id.

    Args:
        creator_id: The Creator id.

    Returns:
        A Creator object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.CREATOR, id_=creator_id)

get_issue

Request an Issue using its id.

PARAMETER DESCRIPTION
issue_id

The Issue id.

TYPE: int

RETURNS DESCRIPTION
Issue

A Issue object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
def get_issue(self, issue_id: int) -> Issue:
    """Request an Issue using its id.

    Args:
        issue_id: The Issue id.

    Returns:
        A Issue object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.ISSUE, id_=issue_id)

get_item

Request an Item using its id.

PARAMETER DESCRIPTION
item_id

The Item id.

TYPE: int

RETURNS DESCRIPTION
Item

An Item object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
def get_item(self, item_id: int) -> Item:
    """Request an Item using its id.

    Args:
        item_id: The Item id.

    Returns:
        An Item object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.ITEM, id_=item_id)

get_location

Request a Location using its id.

PARAMETER DESCRIPTION
location_id

The Location id.

TYPE: int

RETURNS DESCRIPTION
Location

A Location object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
def get_location(self, location_id: int) -> Location:
    """Request a Location using its id.

    Args:
        location_id: The Location id.

    Returns:
        A Location object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.LOCATION, id_=location_id)

get_origin

Request an Origin using its id.

PARAMETER DESCRIPTION
origin_id

The Origin id.

TYPE: int

RETURNS DESCRIPTION
Origin

An Origin object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
def get_origin(self, origin_id: int) -> Origin:
    """Request an Origin using its id.

    Args:
        origin_id: The Origin id.

    Returns:
        An Origin object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.ORIGIN, id_=origin_id)

get_power

Request a Power using its id.

PARAMETER DESCRIPTION
power_id

The Power id.

TYPE: int

RETURNS DESCRIPTION
Power

A Power object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
def get_power(self, power_id: int) -> Power:
    """Request a Power using its id.

    Args:
        power_id: The Power id.

    Returns:
        A Power object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.POWER, id_=power_id)

get_publisher

Request a Publisher using its id.

PARAMETER DESCRIPTION
publisher_id

The Publisher id.

TYPE: int

RETURNS DESCRIPTION
Publisher

A Publisher object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
def get_publisher(self, publisher_id: int) -> Publisher:
    """Request a Publisher using its id.

    Args:
        publisher_id: The Publisher id.

    Returns:
        A Publisher object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.PUBLISHER, id_=publisher_id)

get_story_arc

Request a Story Arc using its id.

PARAMETER DESCRIPTION
story_arc_id

The StoryArc id.

TYPE: int

RETURNS DESCRIPTION
StoryArc

A StoryArc object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
def get_story_arc(self, story_arc_id: int) -> StoryArc:
    """Request a Story Arc using its id.

    Args:
        story_arc_id: The StoryArc id.

    Returns:
        A StoryArc object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.STORY_ARC, id_=story_arc_id)

get_team

Request a Team using its id.

PARAMETER DESCRIPTION
team_id

The Team id.

TYPE: int

RETURNS DESCRIPTION
Team

A Team object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
def get_team(self, team_id: int) -> Team:
    """Request a Team using its id.

    Args:
        team_id: The Team id.

    Returns:
        A Team object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.TEAM, id_=team_id)

get_volume

Request a Volume using its id.

PARAMETER DESCRIPTION
volume_id

The Volume id.

TYPE: int

RETURNS DESCRIPTION
Volume

A Volume object or None if not found.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
def get_volume(self, volume_id: int) -> Volume:
    """Request a Volume using its id.

    Args:
        volume_id: The Volume id.

    Returns:
        A Volume object or None if not found.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_item(resource=ComicvineResource.VOLUME, id_=volume_id)

list_characters

Request a list of Characters.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicCharacter]

A list of Character objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
def list_characters(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicCharacter]:
    """Request a list of Characters.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Character objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.CHARACTER, params=params, max_results=max_results
    )

list_concepts

Request a list of Concepts.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicConcept]

A list of Concept objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
def list_concepts(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicConcept]:
    """Request a list of Concepts.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Concept objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.CONCEPT, params=params, max_results=max_results
    )

list_creators

Request a list of Creators.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicCreator]

A list of Creator objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
def list_creators(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicCreator]:
    """Request a list of Creators.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Creator objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.CREATOR, params=params, max_results=max_results
    )

list_issues

Request a list of Issues.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicIssue]

A list of Issue objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
def list_issues(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicIssue]:
    """Request a list of Issues.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Issue objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.ISSUE, params=params, max_results=max_results
    )

list_items

Request a list of Items.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicItem]

A list of Item objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
def list_items(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicItem]:
    """Request a list of Items.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Item objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.ITEM, params=params, max_results=max_results
    )

list_locations

Request a list of Locations.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicLocation]

A list of Location objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
def list_locations(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicLocation]:
    """Request a list of Locations.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Location objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.LOCATION, params=params, max_results=max_results
    )

list_origins

Request a list of Origins.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicOrigin]

A list of Origin objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
def list_origins(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicOrigin]:
    """Request a list of Origins.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Origin objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.ORIGIN, params=params, max_results=max_results
    )

list_powers

Request a list of Powers.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicPower]

A list of Power objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
def list_powers(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicPower]:
    """Request a list of Powers.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Power objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.POWER, params=params, max_results=max_results
    )

list_publishers

Request a list of Publishers.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicPublisher]

A list of Publisher objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
def list_publishers(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicPublisher]:
    """Request a list of Publishers.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Publisher objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.PUBLISHER, params=params, max_results=max_results
    )

list_story_arcs

Request a list of Story Arcs.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicStoryArc]

A list of StoryArc objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
def list_story_arcs(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicStoryArc]:
    """Request a list of Story Arcs.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of StoryArc objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.STORY_ARC, params=params, max_results=max_results
    )

list_teams

Request a list of Teams.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicTeam]

A list of Team objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
def list_teams(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicTeam]:
    """Request a list of Teams.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Team objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.TEAM, params=params, max_results=max_results
    )

list_volumes

Request a list of Volumes.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: dict[str, Any] | None DEFAULT: None

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicVolume]

A list of Volume objects.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
def list_volumes(
    self, params: dict[str, Any] | None = None, max_results: int | None = 500
) -> list[BasicVolume]:
    """Request a list of Volumes.

    Args:
        params: Parameters to add to the request.
        max_results: If given, return at most this many results.

    Returns:
        A list of Volume objects.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._get_list(
        resource=ComicvineResource.VOLUME, params=params, max_results=max_results
    )

search

Request a list of search results filtered by the provided resource.

Deprecated: Use the resource specific search functions instead.

PARAMETER DESCRIPTION
resource

Filter which type of resource to return.

TYPE: ComicvineResource

query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicPublisher] | list[BasicVolume] | list[BasicIssue] | list[BasicStoryArc] | list[BasicCreator] | list[BasicCharacter] | list[BasicTeam] | list[BasicLocation] | list[BasicConcept] | list[BasicPower] | list[BasicOrigin] | list[BasicItem]

A list of results, mapped to the given resource.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
@deprecated("Use the resource specific search functions instead.")
def search(
    self, resource: ComicvineResource, query: str, max_results: int | None = 500
) -> (
    list[BasicPublisher]
    | list[BasicVolume]
    | list[BasicIssue]
    | list[BasicStoryArc]
    | list[BasicCreator]
    | list[BasicCharacter]
    | list[BasicTeam]
    | list[BasicLocation]
    | list[BasicConcept]
    | list[BasicPower]
    | list[BasicOrigin]
    | list[BasicItem]
):
    """Request a list of search results filtered by the provided resource.

    **Deprecated:** Use the resource specific search functions instead.

    Args:
        resource: Filter which type of resource to return.
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of results, mapped to the given resource.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(resource=resource, query=query, max_results=max_results)

search_characters

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicCharacter]

A list of character results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
def search_characters(self, query: str, max_results: int | None = 500) -> list[BasicCharacter]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of character results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(
        resource=ComicvineResource.CHARACTER, query=query, max_results=max_results
    )

search_concepts

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicConcept]

A list of concept results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
def search_concepts(self, query: str, max_results: int | None = 500) -> list[BasicConcept]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of concept results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(
        resource=ComicvineResource.CONCEPT, query=query, max_results=max_results
    )

search_creators

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicCreator]

A list of creator results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
def search_creators(self, query: str, max_results: int | None = 500) -> list[BasicCreator]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of creator results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(
        resource=ComicvineResource.CREATOR, query=query, max_results=max_results
    )

search_issues

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicIssue]

A list of issue results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
def search_issues(self, query: str, max_results: int | None = 500) -> list[BasicIssue]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of issue results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(resource=ComicvineResource.ISSUE, query=query, max_results=max_results)

search_items

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicItem]

A list of item results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
def search_items(self, query: str, max_results: int | None = 500) -> list[BasicItem]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of item results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(resource=ComicvineResource.ITEM, query=query, max_results=max_results)

search_locations

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicLocation]

A list of location results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
def search_locations(self, query: str, max_results: int | None = 500) -> list[BasicLocation]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of location results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(
        resource=ComicvineResource.LOCATION, query=query, max_results=max_results
    )

search_origins

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicOrigin]

A list of origin results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
def search_origins(self, query: str, max_results: int | None = 500) -> list[BasicOrigin]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of origin results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(resource=ComicvineResource.ORIGIN, query=query, max_results=max_results)

search_powers

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicPower]

A list of power results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
def search_powers(self, query: str, max_results: int | None = 500) -> list[BasicPower]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of power results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(resource=ComicvineResource.POWER, query=query, max_results=max_results)

search_publishers

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicPublisher]

A list of publisher results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
def search_publishers(self, query: str, max_results: int | None = 500) -> list[BasicPublisher]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of publisher results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(
        resource=ComicvineResource.PUBLISHER, query=query, max_results=max_results
    )

search_story_arcs

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicStoryArc]

A list of story arc results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
def search_story_arcs(self, query: str, max_results: int | None = 500) -> list[BasicStoryArc]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of story arc results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(
        resource=ComicvineResource.STORY_ARC, query=query, max_results=max_results
    )

search_teams

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicTeam]

A list of team results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
def search_teams(self, query: str, max_results: int | None = 500) -> list[BasicTeam]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of team results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(resource=ComicvineResource.TEAM, query=query, max_results=max_results)

search_volumes

Request a list of search results.

PARAMETER DESCRIPTION
query

Search query string.

TYPE: str

max_results

If given, return at most this many results.

TYPE: int | None DEFAULT: 500

RETURNS DESCRIPTION
list[BasicVolume]

A list of volume results.

RAISES DESCRIPTION
ServiceError

If the API response is invalid or validation fails.

AuthenticationError

If credentials are invalid.

RateLimitError

If the API rate limit is exceeded.

Source code in simyan/comicvine.py
Python
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
def search_volumes(self, query: str, max_results: int | None = 500) -> list[BasicVolume]:
    """Request a list of search results.

    Args:
        query: Search query string.
        max_results: If given, return at most this many results.

    Returns:
        A list of volume results.

    Raises:
        ServiceError: If the API response is invalid or validation fails.
        AuthenticationError: If credentials are invalid.
        RateLimitError: If the API rate limit is exceeded.
    """
    return self._search(resource=ComicvineResource.VOLUME, query=query, max_results=max_results)