esak package¶
Submodules¶
esak.character module¶
Character module.
This module provides the following classes:
Character
CharacterSchema
CharactersList
- class esak.character.Character(**kwargs)¶
Bases:
object
The Character object contains information for characters.
- Parameters
**kwargs – The keyword arguments used for setting character data from Marvel.
- id¶
The unique ID of the character resource.
- Type
int
- name¶
The name of the character.
- Type
str
- description¶
A short bio or description of the character.
- Type
str
- modified¶
The date the resource was most recently modified.
- Type
datetime
- resource_uri¶
The canonical URL identifier for this resource.
- Type
str
- thumbnail¶
The representative image for this character.
- Type
str
- class esak.character.CharacterSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Character API.
- make(data, **kwargs)¶
Make the character object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Character object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean the data from Marvel.
- Parameters
data – Data from a Marvel api response.
- Returns
Marvel response.
- Return type
dict
- class esak.character.CharactersList(response)¶
Bases:
object
The CharactersList object contains a list of Character objects.
esak.comic module¶
Comic module.
This module provides the following classes:
Comic
ComicSchema
ComicsList
- class esak.comic.Comic(**kwargs)¶
Bases:
object
The Comic object contains information for a comic.
- Parameters
**kwargs – The keyword arguments used for setting data from Marvel.
- id¶
The unique ID of the comic resource.
- Type
int
- digital_id¶
The ID of the digital comic representation of this comic. Will be 0 if the comic is not available digitally.
- Type
int
- title¶
The canonical title of the comic.
- Type
str
- issue_number¶
The number of the issue in the series (will generally be 0 for collection formats).
- Type
int
- variant_description¶
If the issue is a variant (e.g. an alternate cover, second printing, or director’s cut), a text description of the variant.
- Type
str
- description¶
The preferred description of the comic.
- Type
str, optional
- modified¶
The date the resource was most recently modified.
- Type
datetime
- isbn¶
The ISBN for the comic (generally only populated for collection formats).
- Type
str
- upc¶
The UPC barcode number for the comic (generally only populated for periodical formats).
- Type
str
- diamond_code¶
The Diamond code for the comic.
- Type
str
- ean¶
The EAN barcode for the comic.
- Type
str
- issn¶
The ISSN barcode for the comic.
- Type
str
- format¶
The publication format of the comic e.g. comic, hardcover, trade paperback.
- Type
str
- page_count¶
The number of story pages in the comic.
- Type
int
- text_objects¶
A set of descriptive text blurbs for the comic.
- Type
list(TextObject)
- resource_uri¶
The canonical URL identifier for this resource.
- Type
url
- variants¶
A list of variant issues for this comic (includes the “original” issue if the current issue is a variant).
- Type
list(Summary)
- collections¶
A list of collections which include this comic (will generally be empty if the comic’s format is a collection).
- Type
list(Summary)
- collected_issues¶
A list of issues collected in this comic (will generally be empty for periodical formats such as “comic” or “magazine”).
- Type
list(Summary)
- prices¶
A list of prices for this comic.
- Type
list(Price)
- thumbnail¶
The representative image for this comic.
- Type
url
- images¶
A list of promotional images associated with this comic.
- Type
list(url)
- class esak.comic.ComicSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Comic API.
Changed in version 1.3.0:
Added
thumbnail
andtext_objects
fields.Unknowns fields will now be excluded.
- make(data, **kwargs)¶
Make the Comic object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Comic object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean the data from Marvel.
- Parameters
data – Data from a Marvel api response.
- Returns
Marvel response.
- Return type
dict
- class esak.comic.ComicsList(response)¶
Bases:
object
The ComicsList object contains a list of Comic objects.
esak.creator module¶
Creator module.
This module provides the following classes:
Creator
CreatorSchema
- class esak.creator.Creator(**kwargs)¶
Bases:
object
The Creator object contains information for creators.
- Parameters
**kwargs – The keyword arguments used for setting character data from Marvel.
- id¶
The unique ID of the creator resource.
- Type
int
- first_name¶
The first name of the creator.
- Type
str
- middle_name¶
The middle name of the creator.
- Type
str
- last_name¶
The last name of the creator.
- Type
str
- suffix¶
The suffix or honorific for the creator.
- Type
str
- full_name¶
The full name of the creator (a space-separated concatenation of the above four fields).
- Type
str
- modified¶
The date the resource was most recently modified.
- Type
datetime
- resource_uri¶
The canonical URL identifier for this resource.
- Type
url
- thumbnail¶
The representative image for this creator.
- Type
url
- series¶
A resource list containing the series which feature work by this creator.
- Type
list(Summary)
- stories¶
A resource list containing the stories which feature work by this creator.
- Type
list(Summary)
- class esak.creator.CreatorsList(response)¶
Bases:
object
The CreatorsList object contains a list of Creator objects.
- class esak.creator.CreatorsSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Creator API.
- make(data, **kwargs)¶
Make the Creator object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Creator object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean the data from Marvel.
- Parameters
data – Data from a Marvel api response.
- Returns
Marvel response.
- Return type
dict
esak.dates module¶
Dates module.
This module provides the following classes:
Dates
DatesSchema
- class esak.dates.Dates(on_sale=None, foc=None, unlimited=None, **kwargs)¶
Bases:
object
The Dates object contains common dates.
- Parameters
on_sale (date) – The date the comic went on sale.
foc (date) – The final order cutoff date.
unlimited (date) – The date it was release on Marvel Unlimited.
**kwargs – The keyword arguments used for setting any other date from Marvel.
- on_sale¶
The date the comic went on sale.
- Type
date
- foc¶
The final order cutoff date.
- Type
date
- unlimited¶
The date it was release on Marvel Unlimited.
- Type
date
- class esak.dates.DatesSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Dates.
- class Meta¶
Bases:
object
Any unknown fields will be included.
- dateformat = '%Y-%m-%dT%H:%M:%S%z'¶
- unknown = 'include'¶
- make(data, **kwargs)¶
Make the dates object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Date object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean up response data.
esak.event module¶
Events module.
This module provides the following classes:
Event
EventSchema
EventsList
- class esak.event.EventSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Event API.
- class Meta¶
Bases:
object
Any unknown fields will be included.
- dateformat = '%Y-%m-%d %H:%M:%S'¶
- unknown = 'include'¶
- make(data, **kargs)¶
Make the events object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Event object
- Return type
Event
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean the data from Marvel.
- Parameters
data – Data from a Marvel api response.
- Returns
Marvel response.
- Return type
dict
- class esak.event.Events(**kwargs)¶
Bases:
object
The Event object contains information for events.
- Parameters
**kwargs – The keyword arguments used for setting data from Marvel.
- id¶
The unique ID of the event resource.
- Type
int
- title¶
The title of the event.
- Type
str
- description¶
A description of the event.
- Type
str
- resource_uri¶
The canonical URL identifier for this resource.
- Type
url
- modified¶
The date the resource was most recently modified.
- Type
datetime
- start¶
The date of publication of the first issue in this event.
- Type
date
- end¶
The date of publication of the last issue in this event.
- Type
date
- thumbnail¶
The representative image for this event.
- Type
url
- class esak.event.EventsList(response)¶
Bases:
object
The EventsList object contains a list of Events objects.
esak.exceptions module¶
Exceptions module.
This module provides the following classes:
ApiError
AuthenticationError
CacheError
- exception esak.exceptions.ApiError(*args, **kwargs)¶
Bases:
Exception
Class for any api errors.
esak.prices module¶
Prices module.
This module provides the following classes:
Prices
PricesSchema
- class esak.prices.PriceSchemas(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Prices.
- make(data, **kwargs)¶
Make the prices object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Prices object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean up response data.
- class esak.prices.Prices(print=None, digital=None, **kwargs)¶
Bases:
object
The Prices object contains price information.
- Parameters
print (decimal) – The price of print comic.
digital (decimal) – The price of digital comic.
**kwargs – The keyword arguments used for setting any other price from Marvel.
- print¶
The price of print comic.
- Type
decimal
- digital¶
The price of digital comic.
- Type
decimal
esak.series module¶
Series module.
This module provides the following classes:
Series
SeriesSchema
- class esak.series.Series(**kwargs)¶
Bases:
object
The Series object contains information for a series.
- Parameters
**kwargs – The keyword arguments used for setting data from Marvel.
- id¶
The unique ID of the series resource.
- Type
int
- title¶
The canonical title of the series.
- Type
str
- description¶
A description of the series.
- Type
str
- resource_uri¶
The canonical URL identifier for this resource.
- Type
url
- start_year¶
The first year of publication for the series.
- Type
int
- end_year¶
The last year of publication for the series (conventionally, 2099 for ongoing series).
- Type
int
- rating¶
The age-appropriateness rating for the series.
- Type
str
- modified¶
The date the resource was most recently modified.
- Type
datetime
- thumbnail¶
The representative image for this series.
- Type
url
- stories¶
A resource list containing stories which occur in comics in this series.
- Type
list(Summary)
- events¶
A resource list containing events which take place in comics in this series.
- Type
list(Summary)
- characters¶
A resource list containing characters which appear in comics in this series.
- Type
list(Summary)
- class esak.series.SeriesList(response)¶
Bases:
object
The SeriesList object contains a list of Series objects.
- class esak.series.SeriesSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Comic API.
- make(data, **kwargs)¶
Make the Series object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Series object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean the data from Marvel.
- Parameters
data – Data from a Marvel api response.
- Returns
Marvel response.
- Return type
dict
esak.session module¶
Session module.
This module provides the following classes:
Session
- class esak.session.Session(public_key: str, private_key: str, cache: Optional[SqliteCache] = None)¶
Bases:
object
Session to request api endpoints.
- Parameters
public_key (str) – The public_key for authentication with Marvel
private_key (str) – The private_key used for authentication with Marvel
SqliteCache (optional, SqliteCache) – SqliteCache to use
- Returns
A
Session
object to make api calls to Marvel.- Return type
- character_comics(_id: int, params: Optional[Dict[str, Any]] = None) ComicsList ¶
Request a list of comics for a character.
- Parameters
_id (int) – The character id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Comic
objects.- Return type
- character_events(_id: int, params: Optional[Dict[str, Any]] = None) EventsList ¶
Request a list of events for a character.
- Parameters
_id (int) – The character id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Event
objects.- Return type
- character_series(_id: int, params: Optional[Dict[str, Any]] = None) SeriesList ¶
Request a list of series for a character.
- Parameters
_id (int) – The character id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Series
objects.- Return type
- character_stories(_id: int, params: Optional[Dict[str, Any]] = None) StoriesList ¶
Request a list of stories for a character.
- Parameters
_id (int) – The character id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Stories
objects.- Return type
- characters_list(params: Optional[Dict[str, Any]] = None) CharactersList ¶
Request a list of characters.
- Parameters
_id (int) – The character id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Character
objects.- Return type
- comic_characters(_id: int, params: Optional[Dict[str, Any]] = None) CharactersList ¶
Request a list of characters from a comic.
- Parameters
_id (int) – The comic id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Character
objects.- Return type
- comic_creators(_id: int, params: Optional[Dict[str, Any]] = None) CreatorsList ¶
Request a list of creators from a comic.
- Parameters
_id (int) – The comic id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Creator
objects.- Return type
- comic_events(_id: int, params: Optional[Dict[str, Any]] = None) EventsList ¶
Request a list of events from a comic.
- Parameters
_id (int) – The comic id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Event
objects.- Return type
- comic_stories(_id: int, params: Optional[Dict[str, Any]] = None) StoriesList ¶
Request a list of stories from a comic.
- Parameters
_id (int) – The comic id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Stories
objects.- Return type
- comics_list(params: Optional[Dict[str, Any]] = None) ComicsList ¶
Request a list of comics.
- Parameters
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Comic
objects.- Return type
- creator_comics(_id: int, params: Optional[Dict[str, Any]] = None) ComicsList ¶
Request a list of comics from a creator.
- Parameters
_id (int) – The creator id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Comic
objects.- Return type
- creator_events(_id: int, params: Optional[Dict[str, Any]] = None) EventsList ¶
Request a list of events from a creator.
- Parameters
_id (int) – The creator id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Event
objects.- Return type
- creator_series(_id: int, params: Optional[Dict[str, Any]] = None) SeriesList ¶
Request a list of series by a creator.
- Parameters
_id (int) – The creator id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Series
objects.- Return type
- creator_stories(_id: int, params: Optional[Dict[str, Any]] = None) StoriesList ¶
Request a list of stories from a creator.
- Parameters
_id (int) – The creator id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Stories
objects.- Return type
- creators_list(params: Optional[Dict[str, Any]] = None) CreatorsList ¶
Request a list of creators.
- Parameters
_id (int) – The creator id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Creator
objects.- Return type
- event_characters(_id: int, params: Optional[Dict[str, Any]] = None) CharactersList ¶
Request a list of characters from an event.
- Parameters
_id (int) – The event id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Character
objects.- Return type
- event_comics(_id: int, params: Optional[Dict[str, Any]] = None) ComicsList ¶
Request a list of comics for an event.
- Parameters
_id (int) – The event id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Comic
objects.- Return type
- event_creators(_id: int, params: Optional[Dict[str, Any]] = None) CreatorsList ¶
Request a list of creators from an event.
- Parameters
_id (int) – The event id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Creator
objects.- Return type
- event_series(_id: int, params: Optional[Dict[str, Any]] = None) SeriesList ¶
Request a list of series for an event.
- Parameters
_id (int) – The event id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Series
objects.- Return type
- event_stories(_id: int, params: Optional[Dict[str, Any]] = None) StoriesList ¶
Request a list of stories for an event.
- Parameters
_id (int) – The event id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Stories
objects.- Return type
- events_list(params: Optional[Dict[str, Any]] = None) EventsList ¶
Request a list of events.
- Parameters
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Event
objects.- Return type
- series_characters(_id: int, params: Optional[Dict[str, Any]] = None) CharactersList ¶
Request a list of characters from a series.
- Parameters
_id (int) – The series id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Character
objects.- Return type
- series_comics(_id: int, params: Optional[Dict[str, Any]] = None) ComicsList ¶
Request a list of comics from a series.
- Parameters
_id (int) – The series id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Comic
objects.- Return type
- series_creators(_id: int, params: Optional[Dict[str, Any]] = None) CreatorsList ¶
Request a list of creators from a series.
- Parameters
_id (int) – The series id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Creator
objects.- Return type
- series_events(_id: int, params: Optional[Dict[str, Any]] = None) EventsList ¶
Request a list of events from a series.
- Parameters
_id (int) – The series id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Event
objects.- Return type
- series_list(params: Optional[Dict[str, Any]] = None) SeriesList ¶
Request a list of series.
- Parameters
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Series
objects.- Return type
- series_stories(_id: int, params: Optional[Dict[str, Any]] = None) StoriesList ¶
Request a list of stories from a series.
- Parameters
_id (int) – The series id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Stories
objects.- Return type
- stories_list(params: Optional[Dict[str, Any]] = None) StoriesList ¶
Request a list of stories.
- Parameters
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Stories
objects.- Return type
- story_characters(_id: int, params: Optional[Dict[str, Any]] = None) CharactersList ¶
Request a list of characters from a story.
- Parameters
_id (int) – The story id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Character
objects.- Return type
- story_comics(_id: int, params: Optional[Dict[str, Any]] = None) ComicsList ¶
Request a list of comics for a story.
- Parameters
_id (int) – The story id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Comic
objects.- Return type
- story_creators(_id: int, params: Optional[Dict[str, Any]] = None) CreatorsList ¶
Request a list of creators from a story.
- Parameters
_id (int) – The story id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Creator
objects.- Return type
- story_events(_id: int, params: Optional[Dict[str, Any]] = None) EventsList ¶
Request a list of events for a story.
- Parameters
_id (int) – The story id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Event
objects.- Return type
- story_series(_id: int, params: Optional[Dict[str, Any]] = None) SeriesList ¶
Request a list of series for a story.
- Parameters
_id (int) – The story id.
params (dict, optional) – Parameters to add to the request.
- Returns
A list of
Series
objects.- Return type
esak.sqlite_cache module¶
SQLite Cache module.
This module provides the following classes:
SqliteCache
- class esak.sqlite_cache.SqliteCache(db_name: str = 'esak_cache.db', expire: Optional[int] = None)¶
Bases:
object
The SqliteCache object to cache search results from Marvel.
- Parameters
db_name (str) – Path and database name to use.
expire (int, optional) – The number of days to keep the cache results before they expire.
- Returns
A
SqliteCache
Object.- Return type
- cleanup() None ¶
Remove any expired data from the cache database.
- get(key: str) Optional[Any] ¶
Retrieve data from the cache database.
- Parameters
key (str) – value to search for.
- store(key: str, value: str) None ¶
Save data to the cache database.
- Parameters
key (str) – Item id.
value (str) – data to save.
esak.stories module¶
Stories module.
This module provides the following classes:
Stories
StoriesSchema
StoriesList
- class esak.stories.Stories(**kwargs)¶
Bases:
object
The Stories object contains information for stories.
- Parameters
**kwargs – The keyword arguments used for setting stories data from Marvel.
- id¶
The unique ID of the story resource.
- Type
int
- title¶
The story title.
- Type
str
- descriptions¶
A short description of the story.
- Type
str
- resource_uri¶
The canonical URL identifier for this resource.
- Type
url
- type¶
The story type e.g. interior story, cover, text story.
- Type
str
- modified¶
The date the resource was most recently modified.
- Type
datetime
- thumbnail¶
The representative image for this story.
- Type
url
- class esak.stories.StoriesList(response)¶
Bases:
object
The StoriesList object contains a list of Stories objects.
- class esak.stories.StoriesSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Stories API.
- make(data, **kargs)¶
Make the stories object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Stories object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean the data from Marvel.
- Parameters
data – Data from a Marvel api response.
- Returns
Marvel response.
- Return type
dict
esak.summary module¶
Summary module.
This module provides the following classes:
Summary
SummarySchema
- class esak.summary.Summary(id=None, name=None, resource_uri=None, type=None, role=None, **kwargs)¶
Bases:
object
The Summary object contains basic information.
- Parameters
**kwargs – The keyword arguments used for setting summary data from Marvel.
- id¶
The unique ID of the summary resource.
- Type
int
- name¶
The name of the summary.
- Type
str
- resource_uri¶
The path to the individual summary resource.
- Type
url
- type¶
The summary type.
- Type
str
- role¶
The role of the summary in the parent entity.
- Type
str
- class esak.summary.SummarySchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Summary.
- make(data, **kwargs)¶
Make the Summary object.
- Parameters
data – Data from a Marvel API response.
- Returns
A Summary object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Extract the summary id.
esak.text_object module¶
TextObject module.
This module provides the following classes:
TextObject
TextObjectSchema
- class esak.text_object.TextObject(**kwargs)¶
Bases:
object
The TextObject object contains basic information.
- Parameters
**kwargs – The keyword arguments used for setting textobject data from Marvel.
- type¶
The canonical type of the text object (e.g. solicit text, preview text, etc.).
- Type
str
- language¶
The IETF language tag denoting the language the text object is written in.
- Type
str
- text¶
The text.
- Type
str
- class esak.text_object.TextObjectSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the TextObject.
- make(data, **kwargs)¶
Make the TextObject object.
- Parameters
data – Data from a Marvel API response.
- Returns
A TextObject object
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
esak.urls module¶
Urls module.
This module provides the following classes:
Urls
UrlsSchema
- class esak.urls.Urls(digital_purchase_date=None, foc_date=None, onsale_date=None, unlimited_date=None, wiki=None, detail=None, **kwargs)¶
Bases:
object
The Urls object contains commonly used urls.
- Parameters
digital_purchase_date – The url for the digital_purchase_date
foc_date – The url for the final order cutoff date.
onsale_date – The url for the on sale date.
unlimited_date – The url for the Marvel Unlimited date.
wiki – The url for the wiki entry.
detail – The url for detail information.
**kwargs – The keyword arguments used for setting any other url from Marvel.
- digital_purchase_date¶
The url for the digital_purchase_date
- Type
Url
- foc_date¶
The url for the final order cutoff date.
- Type
Url
- onsale_date¶
The url for the on sale date.
- Type
Url
- unlimited_date¶
The url for the Marvel Unlimited date.
- Type
Url
- wiki¶
The url for the wiki entry.
- Type
Url
- detail¶
The url for detail information.
- Type
Url
- class esak.urls.UrlsSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)¶
Bases:
Schema
Schema for the Urls.
- make(data, **kwargs)¶
Make the urls object.
- Parameters
data – Data from a Marvel api response.
- Returns
A Urls object.
- Return type
- opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>¶
- process_input(data, **kwargs)¶
Clean up response data.
esak.utils module¶
Utils module.
This module provides the following functions:
check_mod_date
- esak.utils.check_mod_date(data)¶
Remove a bad modification date from json data.
- Parameters
data – Data from a Marvel API response.
Module contents¶
Project entry file.
- esak.api(public_key: Optional[str] = None, private_key: Optional[str] = None, cache: Optional[SqliteCache] = None) Session ¶
Entry function the sets login credentials for Marvel’s API.
- Parameters
public_key (str, optional) – The user’s public key obtained from Marvel.
private_key (str, optional) – The user’s private key obtained from Marvel.
cache (SqliteCache, optional) – SqliteCache to use
- Return type
- Raises
AuthenticationError – If Marvel credentials are missing.