Skip to main content

# Marvel API

Installation

Using pip:

pip install marvel

This is an API wrapper for [Marvel](https://developer.marvel.com/docs).

Usage

Usage is as simple as it gets:

from marvel import Marvel m = Marvel(PUBLIC_KEY, PRIVATE_KEY)

Now there are six objects presented namely, characters, comics, creators, events, series and stories as listed at [Developers](https://developers.zomato.com/documentation)

characters = m.characters comics = m.comics creators = m.creators events = m.events series = m.series stories = m.stories

Each of the above object returns back the appropriate response (json) as mentioned in official [docs](https://developer.marvel.com/docs)

Module Examples

Module Examples:

m = Marvel(PUBLIC_KEY, PRIVATE_KEY) characters = m.characters

Get All Characters:

all_characters = characters.all()

Get Single Character:

character = characters.get(1011334)

Get Some Character’s Comics:

comics = characters.comics(1011334)

Similarly, you could apply the same logic to different objects, an example:

m = Marvel(PUBLIC_KEY, PRIVATE_KEY) stories = m.stories all_stores = stories.all() story = stories.get(id) events = stories.events(id)

Finally, the sub resources that each object has are as follows:

  • Characters
    • all

    • get

    • comics

    • events

    • series

    • stories

  • Comics
    • all

    • get

    • characters

    • creators

    • events

    • stories

  • Creators
    • all

    • get

    • comics

    • events

    • series

    • stories

  • Events
    • all

    • get

    • characters

    • comics

    • creators

    • series

    • stories

  • Series
    • all

    • get

    • characters

    • comics

    • creators

    • events

    • stories

  • Stories
    • all

    • get

    • characters

    • comics

    • creators

    • events

    • series

# Exception Handling

You can catch any exception caused by Marvel API such as authentication error, bad input error, server down error, etc by handling the MarvelException at marvel/exceptions.py.

# Running Tests

python -m pytest tests/

Metadata

Release files for marvel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marvel 0.1.0
File Size Uploaded Provenance
marvel-0.1.0.tar.gz 5.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for marvel 0.1.0
File Interpreter ABI Platform
marvel-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 13.0 kB

Release files / marvel-0.1.0.tar.gz

Download URL marvel-0.1.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
39149db469a35dba8ad93b5f46ff64bc8c8714b681f0079cca015981d2eb4076
BLAKE2b-256 checksum
How to use checksums
8fc03896ff109890028ab18866b4e362c8cb4a4f3896fd1e5fda2930aa05eb78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.5

Release files / marvel-0.1.0-py2.py3-none-any.whl

Download URL marvel-0.1.0-py2.py3-none-any.whl
Size 8.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fa3f8ded061a22b1ec7315efb1c7c432ba56557261d9add6889a488b0d767188
BLAKE2b-256 checksum
How to use checksums
4d320b82aa5baa39bad2a523ed383310019ecd09d5c62a6ecf2b030a023ea048
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/3.6.5

Security for marvel 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page