Skip to main content

Marvel API wrapper for python.

Project description

https://travis-ci.org/rkuykendall/marvelous.svg?branch=master https://codecov.io/gh/rkuykendall/marvelous/branch/master/graph/badge.svg

To install:

pip install marvelous

Example Usage:

import marvelous

# Your own config file to keep your private key local and secret
from config import public_key, private_key

# Authenticate with Marvel, with keys I got from http://developer.marvel.com/
m = marvelous.api(public_key, private_key)

# Get all comics from this week, sorted alphabetically by title
pulls = sorted(m.comics({
    'format': "comic",
    'formatType': "comic",
    'noVariants': True,
    'dateDescriptor': "thisWeek",
    'limit': 100}),
    key=lambda comic: comic.title)

for comic in pulls:
    # Write a line to the file with the name of the issue, and the
    # id of the series
    print('{} (series #{})'.format(comic.title, comic.series.id))

Output available in full documentation

Contributing

  • To run the test suite, run python -m nose in this folder

  • When running a new test for the first time, set the environment variables PUBLIC_KEY and PRIVATE_KEY to any Marel API keys. The result will be stored in the tests/testing_mock.sqlite database without your keys.

To release:

  • Update version number

  • Create tag on Github

  • Wait for Travis to publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marvelous-1.2.1.tar.gz (9.6 kB view details)

Uploaded Source

File details

Details for the file marvelous-1.2.1.tar.gz.

File metadata

  • Download URL: marvelous-1.2.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for marvelous-1.2.1.tar.gz
Algorithm Hash digest
SHA256 a3e872e89f26695faed0b3c19340556e7875291ff8dbee1253a4e683996a8ba7
MD5 2d51b2c2106d58f87a73d57f4eda1a61
BLAKE2b-256 888fe381cecae652e88627d63cb59b0bd464ff489cdff6afdb3b7e1e4d6d2df7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page