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
~Character.aliases (str) – List of names the Character has used, separated by
\n
.~Character.api_url (str) – Url to the ComicVine API.
~Character.creators (list[GenericEntry]) – List of creators which worked on the Character.
~Character.date_added (datetime) – Date and time when the Character was added to ComicVine.
~Character.date_last_updated (datetime) – Date and time when the Character was updated on ComicVine.
~Character.date_of_birth (date, Optional) – Date when the Character was born.
~Character.deaths (list[GenericEntry]) – List of times when the Character has died.
~Character.description (str) – Long description of the Character.
~Character.enemies (list[GenericEntry]) – List of enemies the Character has.
~Character.enemy_teams (list[GenericEntry]) – List of enemy teams the Character has.
~Character.first_issue (IssueEntry) – First issue the Character appeared in.
~Character.friendly_teams (list[GenericEntry]) – List of friendly teams the Character has.
~Character.friends (list[GenericEntry]) – List of friends the Character has.
~Character.gender (int) – Character gender.
~Character.id (int) – Identifier used in ComicVine.
~Character.image (ImageEntry) – Different sized images, posters and thumbnails for the Character.
~Character.issue_count (int, Optional) – Number of issues the Character appears in.
~Character.issues (list[GenericEntry]) – List of issues the Character appears in.
~Character.name (str) – Real name or public identity of Character.
~Character.origin (GenericEntry) – The type of Character.
~Character.powers (list[GenericEntry]) – List of powers the Character has.
~Character.publisher (GenericEntry) – The publisher of the Character.
~Character.real_name (str) – Name of the Character.
~Character.site_url (str) – Url to the ComicVine Website.
~Character.story_arcs (list[GenericEntry]) – List of story arcs the Character appears in.
~Character.summary (str, Optional) – Short description of the Character.
~Character.teams (list[GenericEntry]) – List of teams the Character appears in.
~Character.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
~CharacterResult.aliases (str) – List of names the Character has used, separated by
\n
.~CharacterResult.api_url (str) – Url to the ComicVine API.
~CharacterResult.date_added (datetime) – Date and time when the Character was added to ComicVine.
~CharacterResult.date_last_updated (datetime) – Date and time when the Character was updated on ComicVine.
~CharacterResult.date_of_birth (date, Optional) – Date when the Character was born.
~CharacterResult.description (str) – Long description of the Character.
~CharacterResult.first_issue (IssueEntry`) – First issue the Character appeared in.
~CharacterResult.gender (int) – Character gender.
~CharacterResult.id (int) – Identifier used in ComicVine.
~CharacterResult.image (ImageEntry) – Different sized images, posters and thumbnails for the Character.
~CharacterResult.issue_count (int, Optional) – Number of issues the Character appears in.
~CharacterResult.name (str) – Real name or public identity of Character.
~CharacterResult.origin (GenericEntry) – The type of Character.
~CharacterResult.publisher (GenericEntry) – The publisher of the Character.
~CharacterResult.real_name (str) – Name of the Character.
~CharacterResult.site_url (str) – Url to the ComicVine Website.
~CharacterResult.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
~Creator.aliases (str) – List of names the Creator has used, separated by
\n
.~Creator.api_url (str) – Url to the ComicVine API.
~Creator.country (str) – Country where the Creator is from.
~Creator.characters (list[GenericEntry]) – List of characters the Creator has created.
~Creator.date_added (datetime) – Date and time when the Creator was added to ComicVine.
~Creator.date_last_updated (datetime) – Date and time when the Creator was updated on ComicVine.
~Creator.date_of_birth (date, Optional) – Date when the Creator was born.
~Creator.date_of_death (date, Optional) – Date when the Creator died.
~Creator.description (str) – Long description of the Creator.
~Creator.email (str, Optional) – Email address of the Creator.
~Creator.gender (int) – Creator gender.
~Creator.hometown (str, Optional) – Hometown of the Creator.
~Creator.id (int) – Identifier used in ComicVine.
~Creator.image (ImageEntry) – Different sized images, posters and thumbnails for the Creator.
~Creator.issue_count (int, Optional) – Number of issues the Creator appears in.
~Creator.issues (list[GenericEntry]) – List of issues the Creator appears in.
~Creator.name (str) – Name of the Creator.
~Creator.site_url (str) – Url to the ComicVine Website.
~Creator.story_arcs (list[GenericEntry]) – List of story arcs the Creator appears in.
~Creator.summary (str, Optional) – Short description of the Creator.
~Creator.volumes (list[GenericEntry]) – List of volumes the Creator appears in.
~Creator.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
~CreatorResult.aliases (str) – List of names the Creator has used, separated by
\n
.~CreatorResult.api_url (str) – Url to the Creator on the ComicVine API.
~CreatorResult.country (str) – Country where the Creator is from.
~CreatorResult.date_added (datetime) – Date and time when the Creator was added to ComicVine.
~CreatorResult.date_last_updated (datetime) – Date and time when the Creator was updated on ComicVine.
~CreatorResult.date_of_birth (date, Optional) – Date when the Creator was born.
~CreatorResult.date_of_death (date, Optional) – Date when the Creator died.
~CreatorResult.description (str) – Long description of the Creator.
~CreatorResult.email (str, Optional) – Email address of the Creator.
~CreatorResult.gender (int) – Creator gender.
~CreatorResult.hometown (str, Optional) – Hometown of the Creator.
~CreatorResult.id (int) – Identifier used in ComicVine.
~CreatorResult.image (ImageEntry) – Different sized images, posters and thumbnails for the Creator.
~CreatorResult.issue_count (int, Optional) – Number of issues the Creator appears in.
~CreatorResult.name (str) – Name of the Creator.
~CreatorResult.site_url (str) – Url to the Creator on the ComicVine Website.
~CreatorResult.summary (str, Optional) – Short description of the Creator.
~CreatorResult.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
~CountEntry.api_url (str) – Url to the ComicVine API.
~CountEntry.id (int) – Identifier used in ComicVine.
~CountEntry.name (str) –
~CountEntry.site_url (str) – Url to the ComicVine Website.
~CountEntry.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
~CreatorEntry.api_url (str) – Url to the ComicVine API.
~CreatorEntry.id (int) – Identifier used in ComicVine.
~CreatorEntry.name (str) –
~CreatorEntry.site_url (str) – Url to the ComicVine Website.
~CreatorEntry.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
~GenericEntry.api_url (str) – Url to the ComicVine API.
~GenericEntry.id (int) – Identifier used in ComicVine.
~GenericEntry.name (str) –
~GenericEntry.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
~ImageEntry.icon (str) – Url to image of Icon size.
~ImageEntry.medium (str) – Url to image of Medium size.
~ImageEntry.screen (str) – Url to image of Screen size.
~ImageEntry.screen_large (str) – Url to image of Screen Large size.
~ImageEntry.small (str) – Url to image of Small size.
~ImageEntry.super (str) – Url to image of Super size.
~ImageEntry.thumb (str) – Url to image of Thumbnail size.
~ImageEntry.tiny (str) – Url to image of Tiny size.
~ImageEntry.original (str) – Url to image of Original size.
~ImageEntry.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
~IssueEntry.api_url (str) – Url to the ComicVine API.
~IssueEntry.id (int) – Identifier used in ComicVine.
~IssueEntry.name (str) –
~IssueEntry.site_url (str) – Url to the ComicVine Website.
~IssueEntry.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
~Issue.aliases (str) – List of names the Issue has used, separated by
\n
.~Issue.api_url (str) – Url to the ComicVine API.
~Issue.character_deaths (list[GenericEntry]) – List of characters who died in the Issue.
~Issue.characters (list[GenericEntry]) – List of characters in the Issue.
~Issue.concepts (list[GenericEntry]) – List of concepts in the Issue.
~Issue.cover_date (date) – Date on the cover of the Issue.
~Issue.creators (list[GenericEntry]) – List of creators which worked on the Issue.
~Issue.date_added (datetime) – Date and time when the Issue was added to ComicVine.
~Issue.date_last_updated (datetime) – Date and time when the Issue was updated on ComicVine.
~Issue.description (str) – Long description of the Issue.
~Issue.first_appearance_characters (Optional, list[GenericEntry]) – List of characters who first appear in the Issue.
~Issue.first_appearance_concepts (Optional, list[GenericEntry]) – List of concepts which first appear in the Issue.
~Issue.first_appearance_locations (Optional, list[GenericEntry]) – List of locations which first appear in the Issue.
~Issue.first_appearance_objects (Optional, list[GenericEntry]) – List of objects which first appear in the Issue.
~Issue.first_appearance_story_arcs (Optional, list[GenericEntry]) – List of story arcs which start in the Issue.
~Issue.first_appearance_teams (Optional, list[GenericEntry]) – List of teams which first appear in the Issue.
~Issue.id (int) – Identifier used in ComicVine.
~Issue.image (ImageEntry) – Different sized images, posters and thumbnails for the Issue.
~Issue.locations (list[GenericEntry]) – List of locations which appear in the Issue.
~Issue.name (str) – Name/Title of the Issue.
~Issue.number (str) – The Issue number.
~Issue.objects (list[GenericEntry]) – List of objects which appear in the Issue.
~Issue.site_url (str) – Url to the ComicVine Website.
~Issue.store_date (date, Optional) – Date the Issue went on sale on stores.
~Issue.story_arcs (list[GenericEntry]) – List of story arcs the Issue appears in.
~Issue.summary (str, Optional) – Short description of the Issue.
~Issue.teams (list[GenericEntry]) – List of teams which appear in the Issue.
~Issue.teams_disbanded (list[GenericEntry]) – List of teams which disbanded in the Issue.
~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
~IssueResult.aliases (str) – List of names the Issue has used, separated by
\n
.~IssueResult.api_url (str) – Url to the ComicVine API.
~IssueResult.cover_date (date) – Date on the cover of the Issue.
~IssueResult.date_added (datetime) – Date and time when the Issue was added to ComicVine.
~IssueResult.date_last_updated (datetime) – Date and time when the Issue was updated on ComicVine.
~IssueResult.description (str) – Long description of the Issue.
~IssueResult.id (int) – Identifier used in ComicVine.
~IssueResult.image (ImageEntry) – Different sized images, posters and thumbnails for the Issue.
~IssueResult.name (str) – Name/Title of the Issue.
~IssueResult.number (str) – The Issue number.
~IssueResult.site_url (str) – Url to the ComicVine Website.
~IssueResult.store_date (date, Optional) – Date the Issue went on sale on stores.
~IssueResult.summary (str, Optional) – Short description of the Issue.
~IssueResult.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
~Publisher.aliases (str) – List of names the Publisher has used, separated by
\n
.~Publisher.api_url (str) – Url to the ComicVine API.
~Publisher.characters (list[GenericEntry]) – List of characters the Publisher created.
~Publisher.date_added (datetime) – Date and time when the Publisher was added to ComicVine.
~Publisher.date_last_updated (datetime) – Date and time when the Publisher was updated on ComicVine.
~Publisher.description (str) – Long description of the Publisher.
~Publisher.id (int) – Identifier used in ComicVine.
~Publisher.image (ImageEntry) – Different sized images, posters and thumbnails for the Publisher.
~Publisher.location_address (str, Optional) – Address of the Publisher.
~Publisher.location_city (str, Optional) – City where the Publisher is.
~Publisher.location_state (str, Optional) – State where the Publisher is.
~Publisher.name (str) – Name/Title of the Publisher.
~Publisher.site_url (str) – Url to the ComicVine Website.
~Publisher.story_arcs (list[GenericEntry]) – List of story arcs the Publisher created.
~Publisher.summary (str, Optional) – Short description of the Publisher.
~Publisher.teams (list[GenericEntry]) – List of teams the Publisher created.
~Publisher.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
~PublisherResult.aliases (str) – List of names the Publisher has used, separated by
\n
.~PublisherResult.api_url (str) – Url to the ComicVine API.
~PublisherResult.date_added (datetime) – Date and time when the Publisher was added to ComicVine.
~PublisherResult.date_last_updated (datetime) – Date and time when the Publisher was updated on ComicVine.
~PublisherResult.description (str) – Long description of the Publisher.
~PublisherResult.id (int) – Identifier used in ComicVine.
~PublisherResult.image (ImageEntry) – Different sized images, posters and thumbnails for the Publisher.
~PublisherResult.location_address (str, Optional) – Address of the Publisher.
~PublisherResult.location_city (str, Optional) – City where the Publisher is.
~PublisherResult.location_state (str, Optional) – State where the Publisher is.
~PublisherResult.name (str) – Name/Title of the Publisher.
~PublisherResult.site_url (str) – Url to the ComicVine Website.
~PublisherResult.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
~Session.api_key (str) – User’s API key to access the ComicVine API.
~Session.header (Dict[str, str]) – Header used when requesting from ComicVine API.
~Session.api_url (str) – ComicVine API url.
~Session.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
~SQLiteCache.expiry (Optional[int]) – How long to keep cache results.
~SQLiteCache.con (sqlite3.Connection) – Database connection
~SQLiteCache.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
~StoryArc.aliases (str) – List of names the Story Arc has used, separated by
\n
.~StoryArc.api_url (str) – Url to the ComicVine API.
~StoryArc.date_added (datetime) – Date and time when the Story Arc was added to ComicVine.
~StoryArc.date_last_updated (datetime) – Date and time when the Story Arc was updated on ComicVine.
~StoryArc.description (str, Optional) – Long description of the Story Arc.
~StoryArc.first_issue (IssueEntry) – First issue of the Story Arc.
~StoryArc.id (int) – Identifier used in ComicVine.
~StoryArc.image (ImageEntry) – Different sized images, posters and thumbnails for the Story Arc.
~StoryArc.issue_count (int) – Number of issues in the Story Arc.
of (issues (list) – obj: GenericEntry): List of issues in the Story Arc.
~StoryArc.name (str) – Name/Title of the Story Arc.
~StoryArc.publisher (GenericEntry) – The publisher of the Story Arc.
~StoryArc.site_url (str) – Url to the ComicVine Website.
~StoryArc.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
~StoryArcResult.aliases (str) – List of names the Story Arc has used, separated by
\n
.~StoryArcResult.api_url (str) – Url to the ComicVine API.
~StoryArcResult.date_added (datetime) – Date and time when the Story Arc was added to ComicVine.
~StoryArcResult.date_last_updated (datetime) – Date and time when the Story Arc was updated on ComicVine.
~StoryArcResult.description (str, Optional) – Long description of the Story Arc.
~StoryArcResult.first_issue (IssueEntry) – First issue of the Story Arc.
~StoryArcResult.id (int) – Identifier used in ComicVine.
~StoryArcResult.image (ImageEntry) – Different sized images, posters and thumbnails for the Story Arc.
~StoryArcResult.issue_count (int) – Number of issues in the Story Arc.
~StoryArcResult.name (str) – Name/Title of the Story Arc.
( (publisher) – obj: GenericEntry): The publisher of the Story Arc.
~StoryArcResult.site_url (str) – Url to the ComicVine Website.
~StoryArcResult.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
~Volume.aliases (str) – List of names the Volume has used, separated by
\n
.~Volume.api_url (str) – Url to the ComicVine API.
~Volume.characters (list[CountEntry]) – List of characters in the Volume.
~Volume.concepts (list[CountEntry]) – List of concepts in the Volume.
~Volume.creators (list[CountEntry]) – List of creators in the Volume.
~Volume.date_added (datetime) – Date and time when the Volume was added to ComicVine.
~Volume.date_last_updated (datetime) – Date and time when the Volume was updated on ComicVine.
~Volume.description (str, Optional) – Long description of the Volume.
~Volume.first_issue (IssueEntry) – First issue of the Volume.
~Volume.id (int) – Identifier used in ComicVine.
~Volume.image (ImageEntry) – Different sized images, posters and thumbnails for the Volume.
~Volume.issue_count (int) – Number of issues in the Volume.
~Volume.issues (list[IssueEntry]) – List of issues in the Volume.
~Volume.last_issue (IssueEntry) – Last issue of the Volume.
~Volume.locations (list[CountEntry]) – List of locations in the Volume.
~Volume.name (str) – Name/Title of the Volume.
~Volume.objects (list[CountEntry]) – List of objects in the Volume.
~Volume.publisher (GenericEntry, Optional) – The publisher of the Volume.
~Volume.site_url (str) – Url to the ComicVine Website.
~Volume.start_year (int, Optional) – The year the Volume started.
~Volume.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
- process_input(data, **kwargs)
Handle non-int values for start_year.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response
**kwargs –
- Returns
ComicVine response with the start year either None or Int.
- Return type
Dict[str, Any]
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
~VolumeResult.aliases (str) – List of names the Volume has used, separated by
\n
.~VolumeResult.api_url (str) – Url to the ComicVine API.
~VolumeResult.date_added (datetime) – Date and time when the Volume was added to ComicVine.
~VolumeResult.date_last_updated (datetime) – Date and time when the Volume was updated on ComicVine.
~VolumeResult.description (str, Optional) – Long description of the Volume.
~VolumeResult.first_issue (IssueEntry) – First issue of the Volume.
~VolumeResult.id (int) – Identifier used in ComicVine.
~VolumeResult.image (ImageEntry) – Different sized images, posters and thumbnails for the Volume.
~VolumeResult.issue_count (int) – Number of issues in the Volume.
~VolumeResult.last_issue (IssueEntry) – Last issue of the Volume.
~VolumeResult.name (str) – Name/Title of the Volume.
~VolumeResult.publisher (GenericEntry, Optional) – The publisher of the Volume.
~VolumeResult.site_url (str) – Url to the ComicVine Website.
~VolumeResult.start_year (int, Optional) – The year the Volume started.
~VolumeResult.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
- process_input(data, **kwargs)
Handle non-int values for start_year.
- Parameters
data (Dict[str, Any]) – Data from the ComicVine response
**kwargs –
- Returns
ComicVine response with the start year either None or Int.
- Return type
Dict[str, Any]