serifan package

Submodules

serifan.comic module

Comic module.

This module provides the following classes:

  • Comic

  • ComicSchema

class serifan.comic.Comic(**kwargs)

Bases: object

The Comic object contains information for an issue.

Parameters

**kwargs – The keyword arguments is used for setting comic data.

class serifan.comic.ComicSchema(*, only: Optional[Union[Sequence[str], Set[str]]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Optional[Dict] = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: Optional[str] = None)

Bases: marshmallow.schema.Schema

Schema for Comic api.

Changed in version 1.0.0: Changed price field to a Decimal type.

class Meta

Bases: object

Any unknown fields will be included.

unknown = 'include'
make_object(data, **kwargs)

Make the comic object.

Parameters

data – Data from Shortboxed response.

Returns

Comic object

Return type

Comic

opts: SchemaOpts = <marshmallow.schema.SchemaOpts object>
process_input(data, **kwargs)

Strip the dollar sign from the price before loading the data.

serifan.comics_list module

ComicsList module.

This module provides the following classes:

  • ComicsList

class serifan.comics_list.ComicsList(response)

Bases: object

The ComicsList object contains a list of Comic objects.

serifan.exceptions module

Exceptions module.

This module provides the following classes:

  • ApiError

exception serifan.exceptions.ApiError(*args, **kwargs)

Bases: Exception

Class for any api errors.

serifan.session module

Session module.

This module provides the following classes:

  • Session

class serifan.session.Session

Bases: object

Session to request api endpoints.

available_release_dates() List[datetime.date]

Retrieve list of release dates.

call(endpoint, params=None)

Make request for api endpoints.

Parameters
  • endpoint (str) – The endpoint to request information from.

  • params (dict) – Parameters to add to the request.

future_releases() serifan.comics_list.ComicsList

Request a list of the next weeks comics.

Returns

A list of Comic objects.

Return type

ComicsList

new_releases() serifan.comics_list.ComicsList

Request a list of this weeks current new release comics.

Returns

A list of Comic objects.

Return type

ComicsList

previous_releases() serifan.comics_list.ComicsList

Request a list of the previous weeks released comics.

Returns

A list of Comic objects.

Return type

ComicsList

query(publisher: Optional[str] = None, title: Optional[str] = None, creators: Optional[str] = None, release_date: Optional[str] = None) serifan.comics_list.ComicsList

Search for a list of comics.

Parameters
  • publisher – Publisher to search by.

  • title – Title to search for.

  • creators – Creator to search for.

  • release_date – Date comics where released in iso8601 format (ie: 2016-02-17).

Returns

A list of Comic objects.

Return type

ComicsList

release_date(release_date: str) serifan.comics_list.ComicsList

Request comics with a specific release date.

Parameters

release_date – Date comics where released in iso8601 format (ie: 2016-02-17).

Returns

A list of Comic objects.

Return type

ComicsList

serifan.utils module

Utils module.

This module provides the following functions:

  • list_strings_to_dates()

serifan.utils.is_decimal(string: str) bool

Check if a string is a decimal.

Parameters

string – A string to check.

Returns

True or False

Return type

bool

serifan.utils.list_strings_to_dates(lst) List[datetime.date]

Convert a list of date strings to a list of date objects.

Parameters

lst – A list of date strings

Returns

A list of datetime.date objects

Return type

date

Module contents

Project entry file.

serifan.api()

Entry function for access to the Shortboxed api.