simyan package
Package contents
simyan package entry file.
- simyan.api(api_key=None, cache=None)
Entry function that sets credentials to use the ComicVine API, and whether to use a database cache for results.
- Parameters
api_key (Optional[str]) – User’s API key to access the ComicVine API.
cache (Optional[simyan.sqlite_cache.SQLiteCache]) – SQLiteCache to use.
- Returns
A Session object with the user’s API key and optional cache.
- Raises
AuthenticationError – If no API key is provided.
- Return type
Deprecated since version 0.6.0: This will be removed in 1.0.0. Use create_session instead
- simyan.create_session(api_key, cache=None)
Entry function that sets credentials to use the ComicVine API, and whether to use a database cache for results.
- Parameters
api_key (str) – User’s API key to access the ComicVine API.
cache (Optional[simyan.sqlite_cache.SQLiteCache]) – SQLiteCache to use.
- Returns
A Session object with the user’s API key and optional cache.
- Return type
Submodules
simyan.character module
The Character module.
This module provides the following classes:
Character
CharacterSchema
- class simyan.character.Character(**kwargs)
Bases:
object
The Character object contains information for a character.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Character has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
creators (list[GenericEntry]) – List of creators which worked on the Character.
date_added (datetime) – Date and time when the Character was added to ComicVine.
date_last_updated (datetime) – Date and time when the Character was updated on ComicVine.
date_of_birth (date, Optional) – Date when the Character was born.
deaths (list[GenericEntry]) – List of times when the Character has died.
description (str) – Long description of the Character.
enemies (list[GenericEntry]) – List of enemies the Character has.
enemy_teams (list[GenericEntry]) – List of enemy teams the Character has.
first_issue (IssueEntry) – First issue the Character appeared in.
friendly_teams (list[GenericEntry]) – List of friendly teams the Character has.
friends (list[GenericEntry]) – List of friends the Character has.
gender (int) – Character gender.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Character.
issue_count (int, Optional) – Number of issues the Character appears in.
issues (list[GenericEntry]) – List of issues the Character appears in.
name (str) – Real name or public identity of Character.
origin (GenericEntry) – The type of Character.
powers (list[GenericEntry]) – List of powers the Character has.
publisher (GenericEntry) – The publisher of the Character.
real_name (str) – Name of the Character.
site_url (str) – Url to the ComicVine Website.
story_arcs (list[GenericEntry]) – List of story arcs the Character appears in.
summary (str, Optional) – Short description of the Character.
teams (list[GenericEntry]) – List of teams the Character appears in.
volumes (list[GenericEntry]) – List of volumes the Character appears in.
- class simyan.character.CharacterSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the Character API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the Character object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A Character object
- Return type
simyan.character_list module
The CharacterList module.
This module provides the following classes:
CharacterList
CharacterResult
CharacterResultSchema
- class simyan.character_list.CharacterList(response)
Bases:
object
The CharacterList object contains a list of CharacterResult objects.
- Parameters
response (List[Dict[str, Any]]) – List of responses returned from ComicVine
- class simyan.character_list.CharacterResult(**kwargs)
Bases:
object
The CharacterResult object contains information for a character.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Character has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
date_added (datetime) – Date and time when the Character was added to ComicVine.
date_last_updated (datetime) – Date and time when the Character was updated on ComicVine.
date_of_birth (date, Optional) – Date when the Character was born.
description (str) – Long description of the Character.
first_issue (IssueEntry`) – First issue the Character appeared in.
gender (int) – Character gender.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Character.
issue_count (int, Optional) – Number of issues the Character appears in.
name (str) – Real name or public identity of Character.
origin (GenericEntry) – The type of Character.
publisher (GenericEntry) – The publisher of the Character.
real_name (str) – Name of the Character.
site_url (str) – Url to the ComicVine Website.
summary (str, Optional) – Short description of the Character.
- class simyan.character_list.CharacterResultSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the CharacterResult API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the CharacterResult object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A CharacterResult object
- Return type
simyan.creator module
The Creator module.
This module provides the following classes:
Creator
CreatorSchema
- class simyan.creator.Creator(**kwargs)
Bases:
object
The Creator object contains information for a creator.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Creator has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
country (str) – Country where the Creator is from.
characters (list[GenericEntry]) – List of characters the Creator has created.
date_added (datetime) – Date and time when the Creator was added to ComicVine.
date_last_updated (datetime) – Date and time when the Creator was updated on ComicVine.
date_of_birth (date, Optional) – Date when the Creator was born.
date_of_death (date, Optional) – Date when the Creator died.
description (str) – Long description of the Creator.
email (str, Optional) – Email address of the Creator.
gender (int) – Creator gender.
hometown (str, Optional) – Hometown of the Creator.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Creator.
issue_count (int, Optional) – Number of issues the Creator appears in.
issues (list[GenericEntry]) – List of issues the Creator appears in.
name (str) – Name of the Creator.
site_url (str) – Url to the ComicVine Website.
story_arcs (list[GenericEntry]) – List of story arcs the Creator appears in.
summary (str, Optional) – Short description of the Creator.
volumes (list[GenericEntry]) – List of volumes the Creator appears in.
website (str, Optional) – Url to the Creator’s website.
- class simyan.creator.CreatorSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the Creator API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the Creator object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A Creator object
- Return type
- process_input(data, **kwargs)
Only keep the date of death information from ComicVine. The timezone info they include is not of any use.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response
**kwargs –
- Returns
ComicVine response with the date of death information included.
- Return type
Dict[str, Any]
simyan.creator_list module
The CreatorList module.
This module provides the following classes:
CreatorList
CreatorResult
CreatorResultSchema
- class simyan.creator_list.CreatorList(response)
Bases:
object
The CreatorList object contains a list of CreatorResult objects.
- Parameters
response (List[Dict[str, Any]]) – List of responses returned from ComicVine
- class simyan.creator_list.CreatorResult(**kwargs)
Bases:
object
The CreatorResult object contains information for a creator.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Creator has used, separated by
\n
.api_url (str) – Url to the Creator on the ComicVine API.
country (str) – Country where the Creator is from.
date_added (datetime) – Date and time when the Creator was added to ComicVine.
date_last_updated (datetime) – Date and time when the Creator was updated on ComicVine.
date_of_birth (date, Optional) – Date when the Creator was born.
date_of_death (date, Optional) – Date when the Creator died.
description (str) – Long description of the Creator.
email (str, Optional) – Email address of the Creator.
gender (int) – Creator gender.
hometown (str, Optional) – Hometown of the Creator.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Creator.
issue_count (int, Optional) – Number of issues the Creator appears in.
name (str) – Name of the Creator.
site_url (str) – Url to the Creator on the ComicVine Website.
summary (str, Optional) – Short description of the Creator.
website (str, Optional) – Url to the Creator’s website.
- class simyan.creator_list.CreatorResultSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the CreatorResult API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the CreatorResult object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A CreatorResult object
- Return type
simyan.exceptions module
The Exceptions module.
This module provides the following classes:
APIError
AuthenticationError
CacheError
- exception simyan.exceptions.APIError
Bases:
Exception
Class for any API errors.
- exception simyan.exceptions.AuthenticationError
Bases:
simyan.exceptions.APIError
Class for any authentication errors.
- exception simyan.exceptions.CacheError
Bases:
simyan.exceptions.APIError
Class for any database cache errors.
simyan.generic_entries module
The GenericEntries module.
This module provides the following classes:
GenericEntry
GenericEntrySchema
CountEntry
CountEntrySchema
IssueEntry
IssueEntrySchema
CreatorEntry
CreatorEntrySchema
ImageEntry
ImageEntrySchema
- class simyan.generic_entries.CountEntry(**kwargs)
Bases:
object
The CountEntry object contains generic information with an added count field.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
api_url (str) – Url to the ComicVine API.
id (int) – Identifier used in ComicVine.
name (str) –
site_url (str) – Url to the ComicVine Website.
count (int) –
- class simyan.generic_entries.CountEntrySchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
simyan.generic_entries.GenericEntrySchema
Schema for the CountEntry data.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- make_object(data, **kwargs)
Make the CountEntry object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A CountEntry object
- Return type
- class simyan.generic_entries.CreatorEntry(**kwargs)
Bases:
object
The CreatorEntry object contains generic information with an added roles field.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
api_url (str) – Url to the ComicVine API.
id (int) – Identifier used in ComicVine.
name (str) –
site_url (str) – Url to the ComicVine Website.
roles (str) – separated by
\n
- class simyan.generic_entries.CreatorEntrySchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
simyan.generic_entries.GenericEntrySchema
Schema for the CreatorEntry data.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- make_object(data, **kwargs)
Make the CreatorEntry object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A CreatorEntry object
- Return type
- class simyan.generic_entries.GenericEntry(**kwargs)
Bases:
object
The GenericEntry object contains generic information.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
api_url (str) – Url to the ComicVine API.
id (int) – Identifier used in ComicVine.
name (str) –
site_url (str) – Url to the ComicVine Website.
- class simyan.generic_entries.GenericEntrySchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the GenericEntry data.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- make_object(data, **kwargs)
Make the GenericEntry object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A GenericEntry object
- Return type
- class simyan.generic_entries.ImageEntry(**kwargs)
Bases:
object
The ImageEntry object contains image information.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
icon (str) – Url to image of Icon size.
medium (str) – Url to image of Medium size.
screen (str) – Url to image of Screen size.
screen_large (str) – Url to image of Screen Large size.
small (str) – Url to image of Small size.
super (str) – Url to image of Super size.
thumb (str) – Url to image of Thumbnail size.
tiny (str) – Url to image of Tiny size.
original (str) – Url to image of Original size.
tags (str, Optional) –
- class simyan.generic_entries.ImageEntrySchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the ImageEntry data.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- make_object(data, **kwargs)
Make the ImageEntry object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
An ImageEntry object
- Return type
- class simyan.generic_entries.IssueEntry(**kwargs)
Bases:
object
The IssueEntry object contains generic information with an added number field.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
api_url (str) – Url to the ComicVine API.
id (int) – Identifier used in ComicVine.
name (str) –
site_url (str) – Url to the ComicVine Website.
number (str, Optional) –
- class simyan.generic_entries.IssueEntrySchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
simyan.generic_entries.GenericEntrySchema
Schema for the IssueEntry data.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- make_object(data, **kwargs)
Make the IssueEntry object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
An IssueEntry object
- Return type
simyan.issue module
The Issue module.
This module provides the following classes:
Issue
IssueSchema
- class simyan.issue.Issue(**kwargs)
Bases:
object
The Issue object contains information for an issue.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Issue has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
character_deaths (list[GenericEntry]) – List of characters who died in the Issue.
characters (list[GenericEntry]) – List of characters in the Issue.
concepts (list[GenericEntry]) – List of concepts in the Issue.
cover_date (date) – Date on the cover of the Issue.
creators (list[GenericEntry]) – List of creators which worked on the Issue.
date_added (datetime) – Date and time when the Issue was added to ComicVine.
date_last_updated (datetime) – Date and time when the Issue was updated on ComicVine.
description (str) – Long description of the Issue.
first_appearance_characters (Optional, list[GenericEntry]) – List of characters who first appear in the Issue.
first_appearance_concepts (Optional, list[GenericEntry]) – List of concepts which first appear in the Issue.
first_appearance_locations (Optional, list[GenericEntry]) – List of locations which first appear in the Issue.
first_appearance_objects (Optional, list[GenericEntry]) – List of objects which first appear in the Issue.
first_appearance_story_arcs (Optional, list[GenericEntry]) – List of story arcs which start in the Issue.
first_appearance_teams (Optional, list[GenericEntry]) – List of teams which first appear in the Issue.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Issue.
locations (list[GenericEntry]) – List of locations which appear in the Issue.
name (str) – Name/Title of the Issue.
number (str) – The Issue number.
objects (list[GenericEntry]) – List of objects which appear in the Issue.
site_url (str) – Url to the ComicVine Website.
store_date (date, Optional) – Date the Issue went on sale on stores.
story_arcs (list[GenericEntry]) – List of story arcs the Issue appears in.
summary (str, Optional) – Short description of the Issue.
teams (list[GenericEntry]) – List of teams which appear in the Issue.
teams_disbanded (list[GenericEntry]) – List of teams which disbanded in the Issue.
volume (GenericEntry) – The volume the Issue is in.
- class simyan.issue.IssueSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the Issue API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the Issue object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
An Issue object
- Return type
simyan.issue_list module
The IssueList module.
This module provides the following classes:
IssueList
IssueResult
IssueResultSchema
- class simyan.issue_list.IssueList(response)
Bases:
object
The IssueList object contains a list of IssueResult objects.
- Parameters
response (List[Dict[str, Any]]) – List of responses returned from ComicVine
- class simyan.issue_list.IssueResult(**kwargs)
Bases:
object
The IssueResult object contains information for an issue.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Issue has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
cover_date (date) – Date on the cover of the Issue.
date_added (datetime) – Date and time when the Issue was added to ComicVine.
date_last_updated (datetime) – Date and time when the Issue was updated on ComicVine.
description (str) – Long description of the Issue.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Issue.
name (str) – Name/Title of the Issue.
number (str) – The Issue number.
site_url (str) – Url to the ComicVine Website.
store_date (date, Optional) – Date the Issue went on sale on stores.
summary (str, Optional) – Short description of the Issue.
volume (GenericEntry) – The volume the Issue is in.
- class simyan.issue_list.IssueResultSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the IssueResult API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the IssueResult object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
An IssueResult object
- Return type
simyan.publisher module
The Publisher module.
This module provides the following classes:
Publisher
PublisherSchema
- class simyan.publisher.Publisher(**kwargs)
Bases:
object
The Publisher object contains information for a publisher.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Publisher has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
characters (list[GenericEntry]) – List of characters the Publisher created.
date_added (datetime) – Date and time when the Publisher was added to ComicVine.
date_last_updated (datetime) – Date and time when the Publisher was updated on ComicVine.
description (str) – Long description of the Publisher.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Publisher.
location_address (str, Optional) – Address of the Publisher.
location_city (str, Optional) – City where the Publisher is.
location_state (str, Optional) – State where the Publisher is.
name (str) – Name/Title of the Publisher.
site_url (str) – Url to the ComicVine Website.
story_arcs (list[GenericEntry]) – List of story arcs the Publisher created.
summary (str, Optional) – Short description of the Publisher.
teams (list[GenericEntry]) – List of teams the Publisher created.
volumes (list[GenericEntry]) – List of volumes the Publisher created.
- class simyan.publisher.PublisherSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the Publisher API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the Publisher object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A Publisher object
- Return type
simyan.publisher_list module
The PublisherList module.
This module provides the following classes:
PublisherList
PublisherResult
PublisherResultSchema
- class simyan.publisher_list.PublisherList(response)
Bases:
object
The PublisherList object contains a list of PublisherResult objects.
- Parameters
response (List[Dict[str, Any]]) – List of responses returned from ComicVine
- class simyan.publisher_list.PublisherResult(**kwargs)
Bases:
object
The PublisherResult object contains information for a publisher.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Publisher has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
date_added (datetime) – Date and time when the Publisher was added to ComicVine.
date_last_updated (datetime) – Date and time when the Publisher was updated on ComicVine.
description (str) – Long description of the Publisher.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Publisher.
location_address (str, Optional) – Address of the Publisher.
location_city (str, Optional) – City where the Publisher is.
location_state (str, Optional) – State where the Publisher is.
name (str) – Name/Title of the Publisher.
site_url (str) – Url to the ComicVine Website.
summary (str, Optional) – Short description of the Publisher.
- class simyan.publisher_list.PublisherResultSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the PublisherResult API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the PublisherResult object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A PublisherResult object
- Return type
simyan.session module
The Session module.
This module provides the following classes:
ComicVineResource
Session
- class simyan.session.ComicVineResource(value)
Bases:
enum.Enum
Class for ComicVine Resource ids.
- CHARACTER = 4005
- CREATOR = 4040
- ISSUE = 4000
- PUBLISHER = 4010
- STORY_ARC = 4045
- VOLUME = 4050
- class simyan.session.Session(api_key, cache=None)
Bases:
object
Session to request ComicVine API endpoints.
- Parameters
api_key (str) – User’s API key to access the ComicVine API.
cache (Optional[simyan.sqlite_cache.SQLiteCache]) – SQLiteCache to use if set.
- Variables
api_key (str) – User’s API key to access the ComicVine API.
header (Dict[str, str]) – Header used when requesting from ComicVine API.
api_url (str) – ComicVine API url.
cache (Optional[SQLiteCache]) – SQLiteCache to use if set.
- character(_id)
Request data for a Character based on its id.
- Parameters
_id (int) – The Character id.
- Returns
A Character object
- Raises
APIError – If there is an issue with mapping the response to the Character object.
- Return type
- character_list(params=None)
Request data for a list of Characters.
- Parameters
params (Optional[Dict[str, Union[str, int]]]) – Parameters to add to the request.
- Returns
A list of CharacterResult objects.
- Raises
APIError – If there is an issue with mapping the response to the CharacterList object.
- Return type
- creator(_id)
Request data for a Creator based on its id.
- Parameters
_id (int) – The Creator id.
- Returns
A Creator object
- Raises
APIError – If there is an issue with mapping the response to the Creator object.
- Return type
- creator_list(params=None)
Request data for a list of Creators.
- Parameters
params (Optional[Dict[str, Union[str, int]]]) – Parameters to add to the request.
- Returns
A list of CreatorResult objects.
- Raises
APIError – If there is an issue with mapping the response to the CreatorList object.
- Return type
- issue(_id)
Request data for an Issue based on its id.
- Parameters
_id (int) – The Issue id.
- Returns
A Issue object
- Raises
APIError – If there is an issue with mapping the response to the Issue object.
- Return type
- issue_list(params=None)
Request data for a list of Issues.
- Parameters
params (Optional[Dict[str, Union[str, int]]]) – Parameters to add to the request.
- Returns
A list of IssueResult objects.
- Raises
APIError – If there is an issue with mapping the response to the IssueList object.
- Return type
- publisher(_id)
Request data for a Publisher based on its id.
- Parameters
_id (int) – The Publisher id.
- Returns
A Publisher object
- Raises
APIError – If there is an issue with mapping the response to the Publisher object.
- Return type
- publisher_list(params=None)
Request data for a list of Publishers.
- Parameters
params (Optional[Dict[str, Union[str, int]]]) – Parameters to add to the request.
- Returns
A list of PublisherResult objects.
- Raises
APIError – If there is an issue with mapping the response to the PublisherList object.
- Return type
- story_arc(_id)
Request data for a Story Arc based on its id.
- Parameters
_id (int) – The StoryArc id.
- Returns
A StoryArc object
- Raises
APIError – If there is an issue with mapping the response to the StoryArc object.
- Return type
- story_arc_list(params=None)
Request data for a list of Story Arcs.
- Parameters
params (Optional[Dict[str, Union[str, int]]]) – Parameters to add to the request.
- Returns
A list of StoryArcResult objects.
- Raises
APIError – If there is an issue with mapping the response to the StoryArcList object.
- Return type
- volume(_id)
Request data for a Volume based on its id.
- Parameters
_id (int) – The Volume id.
- Returns
A Volume object
- Raises
APIError – If there is an issue with mapping the response to the Volume object.
- Return type
simyan.sqlite_cache module
The SQLiteCache module.
This module provides the following classes:
SQLiteCache
- class simyan.sqlite_cache.SQLiteCache(name='Simyan-Cache.sqlite', expiry=14)
Bases:
object
The SQLiteCache object to cache search results from ComicVine.
- Parameters
name (str) – Path and database name to use.
expiry (Optional[int]) – How long to keep cache results.
- Variables
expiry (Optional[int]) – How long to keep cache results.
con (sqlite3.Connection) – Database connection
cur (sqlite3.Cursor) – Database cursor
- delete()
Remove all expired data from the cache database.
- get(key)
Retrieve data from the cache database.
- Parameters
key (str) – Search string
- Returns
None or select results.
- Return type
Optional[Dict[str, Any]]
- insert(query, response)
Insert data into the cache database.
- Parameters
query (str) – Search string
response (str) – Data to save
- select(query)
Retrieve data from the cache database.
- Parameters
query (str) – Search string
- Returns
Empty dict or select results.
- Return type
Dict[str, Any]
- store(key, value)
Insert data into the cache database.
- Parameters
key (str) – Search string
value (str) – Data to save
simyan.story_arc module
The StoryArc module.
This module provides the following classes:
StoryArc
StoryArcSchema
- class simyan.story_arc.StoryArc(**kwargs)
Bases:
object
The StoryArc object contains information for a story arc.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Story Arc has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
date_added (datetime) – Date and time when the Story Arc was added to ComicVine.
date_last_updated (datetime) – Date and time when the Story Arc was updated on ComicVine.
description (str, Optional) – Long description of the Story Arc.
first_issue (IssueEntry) – First issue of the Story Arc.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Story Arc.
issue_count (int) – Number of issues in the Story Arc.
of (issues (list) – obj: GenericEntry): List of issues in the Story Arc.
name (str) – Name/Title of the Story Arc.
publisher (GenericEntry) – The publisher of the Story Arc.
site_url (str) – Url to the ComicVine Website.
summary (str, Optional) – Short description of the Story Arc.
- class simyan.story_arc.StoryArcSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the StoryArc API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the StoryArc object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A StoryArc object
- Return type
simyan.story_arc_list module
The StoryArcList module.
This module provides the following classes:
StoryArcList
StoryArcResult
StoryArcResultSchema
- class simyan.story_arc_list.StoryArcList(response)
Bases:
object
The StoryArcList object contains a list of StoryArcResult objects.
- Parameters
response (List[Dict[str, Any]]) – List of responses returned from ComicVine
- class simyan.story_arc_list.StoryArcResult(**kwargs)
Bases:
object
The StoryArcResult object contains information for a story arc.
- Parameters
**kwargs – The keyword argument is used for setting StoryArc data from ComicVine.
- Variables
aliases (str) – List of names the Story Arc has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
date_added (datetime) – Date and time when the Story Arc was added to ComicVine.
date_last_updated (datetime) – Date and time when the Story Arc was updated on ComicVine.
description (str, Optional) – Long description of the Story Arc.
first_issue (IssueEntry) – First issue of the Story Arc.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Story Arc.
issue_count (int) – Number of issues in the Story Arc.
name (str) – Name/Title of the Story Arc.
( (publisher) – obj: GenericEntry): The publisher of the Story Arc.
site_url (str) – Url to the ComicVine Website.
summary (str, Optional) – Short description of the Story Arc.
- class simyan.story_arc_list.StoryArcResultSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the StoryArcResult API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the StoryArcResult object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A StoryArcResult object
- Return type
simyan.volume module
The Volume module.
This module provides the following classes:
Volume
VolumeSchema
- class simyan.volume.Volume(**kwargs)
Bases:
object
The Volume object contains information for a volume.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Volume has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
characters (list[CountEntry]) – List of characters in the Volume.
concepts (list[CountEntry]) – List of concepts in the Volume.
creators (list[CountEntry]) – List of creators in the Volume.
date_added (datetime) – Date and time when the Volume was added to ComicVine.
date_last_updated (datetime) – Date and time when the Volume was updated on ComicVine.
description (str, Optional) – Long description of the Volume.
first_issue (IssueEntry) – First issue of the Volume.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Volume.
issue_count (int) – Number of issues in the Volume.
issues (list[IssueEntry]) – List of issues in the Volume.
last_issue (IssueEntry) – Last issue of the Volume.
locations (list[CountEntry]) – List of locations in the Volume.
name (str) – Name/Title of the Volume.
objects (list[CountEntry]) – List of objects in the Volume.
publisher (GenericEntry) – The publisher of the Volume.
site_url (str) – Url to the ComicVine Website.
start_year (int, Optional) – The year the Volume started.
summary (str, Optional) – Short description of the Volume.
- class simyan.volume.VolumeSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the Volume API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be excluded.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the Volume object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A Volume object
- Return type
simyan.volume_list module
The VolumeList module.
This module provides the following classes:
VolumeList
VolumeResult
VolumeResultSchema
- class simyan.volume_list.VolumeList(response)
Bases:
object
The VolumeList object contains a list of VolumeResult objects.
- Parameters
response (List[Dict[str, Any]]) – List of responses returned from ComicVine
- class simyan.volume_list.VolumeResult(**kwargs)
Bases:
object
The VolumeResult object contains information for a volume.
- Parameters
**kwargs – The keyword argument is used for setting data from ComicVine.
- Variables
aliases (str) – List of names the Volume has used, separated by
\n
.api_url (str) – Url to the ComicVine API.
date_added (datetime) – Date and time when the Volume was added to ComicVine.
date_last_updated (datetime) – Date and time when the Volume was updated on ComicVine.
description (str, Optional) – Long description of the Volume.
first_issue (IssueEntry) – First issue of the Volume.
id (int) – Identifier used in ComicVine.
image (ImageEntry) – Different sized images, posters and thumbnails for the Volume.
issue_count (int) – Number of issues in the Volume.
last_issue (IssueEntry) – Last issue of the Volume.
name (str) – Name/Title of the Volume.
publisher (GenericEntry) – The publisher of the Volume.
site_url (str) – Url to the ComicVine Website.
start_year (int, Optional) – The year the Volume started.
summary (str, Optional) – Short description of the Volume.
- class simyan.volume_list.VolumeResultSchema(*, only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)
Bases:
marshmallow.schema.Schema
Schema for the VolumeResult API.
- Parameters
only (Optional[Union[Sequence[str], Set[str]]]) –
exclude (Union[Sequence[str], Set[str]]) –
many (bool) –
context (Optional[Dict]) –
load_only (Union[Sequence[str], Set[str]]) –
dump_only (Union[Sequence[str], Set[str]]) –
partial (Union[bool, Sequence[str], Set[str]]) –
unknown (Optional[str]) –
- class Meta
Bases:
object
Any unknown fields will be included.
- dateformat = '%Y-%m-%d %H:%M:%S'
- datetimeformat = '%Y-%m-%d %H:%M:%S'
- unknown = 'exclude'
- make_object(data, **kwargs)
Make the VolumeResult object.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response.
**kwargs –
- Returns
A VolumeResult object
- Return type