Skip to content

Comicvine

Comicvine(api_key: str, timeout: int = 30, cache: Optional[SQLiteCache] = None)

Comicvine to request Comicvine API endpoints.

PARAMETER DESCRIPTION
api_key

User's API key to access the Comicvine API.

TYPE: str

timeout

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

TYPE: int DEFAULT: 30

cache

SQLiteCache to use if set.

TYPE: Optional[SQLiteCache] DEFAULT: None

ATTRIBUTE DESCRIPTION
headers

Header used when requesting from Comicvine API.

TYPE: Dict[str, str]

api_key

User's API key to access the Comicvine API.

TYPE: str

timeout

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

TYPE: int

cache

SQLiteCache to use if set.

TYPE: Optional[SQLiteCache]

Functions

character(character_id: int) -> Character

Request data for a Character based on its id.

DEPRECATED: Use get_character()

PARAMETER DESCRIPTION
character_id

The Character id.

TYPE: int

RETURNS DESCRIPTION
Character

A Character object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

character_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[CharacterEntry]

Request data for a list of Characters.

DEPRECATED: Use list_characters()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[CharacterEntry]

A list of CharacterEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

concept(concept_id: int) -> Concept

Request data for a Concept based on its id.

DEPRECATED: Use get_concept()

PARAMETER DESCRIPTION
concept_id

The Concept id.

TYPE: int

RETURNS DESCRIPTION
Concept

A Concept object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

concept_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[ConceptEntry]

Request data for a list of Concepts.

DEPRECATED: Use list_concepts()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[ConceptEntry]

A list of ConceptEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

creator(creator_id: int) -> Creator

Request data for a Creator based on its id.

DEPRECATED: Use get_creator()

PARAMETER DESCRIPTION
creator_id

The Creator id.

TYPE: int

RETURNS DESCRIPTION
Creator

A Creator object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

creator_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[CreatorEntry]

Request data for a list of Creators.

DEPRECATED: Use list_creators()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[CreatorEntry]

A list of CreatorEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_character(character_id: int) -> Character

Request data for a Character based on its id.

PARAMETER DESCRIPTION
character_id

The Character id.

TYPE: int

RETURNS DESCRIPTION
Character

A Character object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_concept(concept_id: int) -> Concept

Request data for a Concept based on its id.

PARAMETER DESCRIPTION
concept_id

The Concept id.

TYPE: int

RETURNS DESCRIPTION
Concept

A Concept object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_creator(creator_id: int) -> Creator

Request data for a Creator based on its id.

PARAMETER DESCRIPTION
creator_id

The Creator id.

TYPE: int

RETURNS DESCRIPTION
Creator

A Creator object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_issue(issue_id: int) -> Issue

Request data for an Issue based on its id.

PARAMETER DESCRIPTION
issue_id

The Issue id.

TYPE: int

RETURNS DESCRIPTION
Issue

A Issue object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_item(item_id: int) -> Item

Request data for an Item based on its id.

PARAMETER DESCRIPTION
item_id

The Item id.

TYPE: int

RETURNS DESCRIPTION
Item

A Item object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_location(location_id: int) -> Location

Request data for a Location based on its id.

PARAMETER DESCRIPTION
location_id

The Location id.

TYPE: int

RETURNS DESCRIPTION
Location

A Location object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_origin(origin_id: int) -> Origin

Request data for an Origin based on its id.

PARAMETER DESCRIPTION
origin_id

The Origin id.

TYPE: int

RETURNS DESCRIPTION
Origin

A Origin object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_power(power_id: int) -> Power

Request data for a Power based on its id.

PARAMETER DESCRIPTION
power_id

The Power id.

TYPE: int

RETURNS DESCRIPTION
Power

A Power object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_publisher(publisher_id: int) -> Publisher

Request data for a Publisher based on its id.

PARAMETER DESCRIPTION
publisher_id

The Publisher id.

TYPE: int

RETURNS DESCRIPTION
Publisher

A Publisher object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_story_arc(story_arc_id: int) -> StoryArc

Request data for a Story Arc based on its id.

PARAMETER DESCRIPTION
story_arc_id

The StoryArc id.

TYPE: int

RETURNS DESCRIPTION
StoryArc

A StoryArc object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_team(team_id: int) -> Team

Request data for a Team based on its id.

PARAMETER DESCRIPTION
team_id

The Team id.

TYPE: int

RETURNS DESCRIPTION
Team

A Team object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_volume(volume_id: int) -> Volume

Request data for a Volume based on its id.

PARAMETER DESCRIPTION
volume_id

The Volume id.

TYPE: int

RETURNS DESCRIPTION
Volume

A Volume object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

issue(issue_id: int) -> Issue

Request data for an Issue based on its id.

DEPRECATED: Use get_issue()

PARAMETER DESCRIPTION
issue_id

The Issue id.

TYPE: int

RETURNS DESCRIPTION
Issue

A Issue object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

issue_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[IssueEntry]

Request data for a list of Issues.

DEPRECATED: Use list_issues()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[IssueEntry]

A list of IssueEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_characters(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[CharacterEntry]

Request data for a list of Characters.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[CharacterEntry]

A list of CharacterEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_concepts(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[ConceptEntry]

Request data for a list of Concepts.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[ConceptEntry]

A list of ConceptEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_creators(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[CreatorEntry]

Request data for a list of Creators.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[CreatorEntry]

A list of CreatorEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_issues(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[IssueEntry]

Request data for a list of Issues.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[IssueEntry]

A list of IssueEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_items(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[ItemEntry]

Request data for a list of Items.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[ItemEntry]

A list of ItemEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_locations(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[LocationEntry]

Request data for a list of Locations.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[LocationEntry]

A list of LocationEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_origins(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[OriginEntry]

Request data for a list of Origins.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[OriginEntry]

A list of OriginEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_powers(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[PowerEntry]

Request data for a list of Powers.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[PowerEntry]

A list of PowerEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_publishers(params: Optional[Dict[str, Any]] = None, max_results: int = 500) -> List[PublisherEntry]

Request data for a list of Publishers.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Any]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[PublisherEntry]

A list of PublisherEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_story_arcs(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[StoryArcEntry]

Request data for a list of Story Arcs.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[StoryArcEntry]

A list of StoryArcEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_teams(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[TeamEntry]

Request data for a list of Teams.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[TeamEntry]

A list of TeamEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

list_volumes(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[VolumeEntry]

Request data for a list of Volumes.

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[VolumeEntry]

A list of VolumeEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

location(location_id: int) -> Location

Request data for a Location based on its id.

DEPRECATED: Use get_location()

PARAMETER DESCRIPTION
location_id

The Location id.

TYPE: int

RETURNS DESCRIPTION
Location

A Location object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

location_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[LocationEntry]

Request data for a list of Locations.

DEPRECATED: Use list_locations()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[LocationEntry]

A list of LocationEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

publisher(publisher_id: int) -> Publisher

Request data for a Publisher based on its id.

DEPRECATED: Use get_publisher()

PARAMETER DESCRIPTION
publisher_id

The Publisher id.

TYPE: int

RETURNS DESCRIPTION
Publisher

A Publisher object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

publisher_list(params: Optional[Dict[str, Any]] = None, max_results: int = 500) -> List[PublisherEntry]

Request data for a list of Publishers.

DEPRECATED: Use list_publishers()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Any]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[PublisherEntry]

A list of PublisherEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

search(resource: ComicvineResource, query: str, max_results: int = 500) -> Union[List[PublisherEntry], List[VolumeEntry], List[IssueEntry], List[StoryArcEntry], List[CreatorEntry], List[CharacterEntry], List[TeamEntry], List[LocationEntry], List[ConceptEntry], List[PowerEntry], List[OriginEntry], List[ItemEntry]]

Request a list of search results filtered by provided resource.

PARAMETER DESCRIPTION
resource

Filter which type of resource to return.

TYPE: ComicvineResource

query

Search query string.

TYPE: str

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
Union[List[PublisherEntry], List[VolumeEntry], List[IssueEntry], List[StoryArcEntry], List[CreatorEntry], List[CharacterEntry], List[TeamEntry], List[LocationEntry], List[ConceptEntry], List[PowerEntry], List[OriginEntry], List[ItemEntry]]

A list of results, mapped to the given resource.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

story_arc(story_arc_id: int) -> StoryArc

Request data for a Story Arc based on its id.

DEPRECATED: Use get_story_arc()

PARAMETER DESCRIPTION
story_arc_id

The StoryArc id.

TYPE: int

RETURNS DESCRIPTION
StoryArc

A StoryArc object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

story_arc_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[StoryArcEntry]

Request data for a list of Story Arcs.

DEPRECATED: Use list_story_arcs()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[StoryArcEntry]

A list of StoryArcEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

team(team_id: int) -> Team

Request data for a Team based on its id.

DEPRECATED: Use get_team()

PARAMETER DESCRIPTION
team_id

The Team id.

TYPE: int

RETURNS DESCRIPTION
Team

A Team object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

team_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[TeamEntry]

Request data for a list of Teams.

DEPRECATED: Use list_teams()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[TeamEntry]

A list of TeamEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

volume(volume_id: int) -> Volume

Request data for a Volume based on its id.

DEPRECATED: Use get_volume()

PARAMETER DESCRIPTION
volume_id

The Volume id.

TYPE: int

RETURNS DESCRIPTION
Volume

A Volume object

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

volume_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[VolumeEntry]

Request data for a list of Volumes.

DEPRECATED: Use list_volumes()

PARAMETER DESCRIPTION
params

Parameters to add to the request.

TYPE: Optional[Dict[str, Union[str, int]]] DEFAULT: None

max_results

Limits the amount of results looked up and returned.

TYPE: int DEFAULT: 500

RETURNS DESCRIPTION
List[VolumeEntry]

A list of VolumeEntry objects.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

ComicvineResource

Bases: Enum

Enum class for Comicvine Resources.

Attributes

CHARACTER = (4005, 'character', List[CharacterEntry]) instance-attribute class-attribute

Details for the Character resource on Comicvine.

CONCEPT = (4015, 'concept', List[ConceptEntry]) instance-attribute class-attribute

Details for the Concept resource on Comicvine.

CREATOR = (4040, 'person', List[CreatorEntry]) instance-attribute class-attribute

Details for the Creator resource on Comicvine.

ISSUE = (4000, 'issue', List[IssueEntry]) instance-attribute class-attribute

Details for the Issue resource on Comicvine.

ITEM = (4055, 'object', List[ItemEntry]) instance-attribute class-attribute

Details for the Item resource on Comicvine.

LOCATION = (4020, 'location', List[LocationEntry]) instance-attribute class-attribute

Details for the Location resource on Comicvine.

ORIGIN = (4030, 'origin', List[OriginEntry]) instance-attribute class-attribute

Details for the Origin resource on Comicvine.

POWER = (4035, 'power', List[PowerEntry]) instance-attribute class-attribute

Details for the Power resource on Comicvine.

PUBLISHER = (4010, 'publisher', List[PublisherEntry]) instance-attribute class-attribute

Details for the Publisher resource on Comicvine.

STORY_ARC = (4045, 'story_arc', List[StoryArcEntry]) instance-attribute class-attribute

Details for the Story Arc resource on Comicvine.

TEAM = (4060, 'team', List[TeamEntry]) instance-attribute class-attribute

Details for the Team resource on Comicvine.

VOLUME = (4050, 'volume', List[VolumeEntry]) instance-attribute class-attribute

Details for the Volume resource on Comicvine.

resource_id: int property

Start of id used by Comicvine to create unique ids.

search_resource: str property

Resource string for filtering searches.

search_response: Type[T] property

Response type for resource when using a search endpoint.