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 https://img.shields.io/badge/code%20style-black-000000.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.4.2.tar.gz (95.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marvelous-1.4.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: marvelous-1.4.2.tar.gz
  • Upload date:
  • Size: 95.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.8.0-1042-azure

File hashes

Hashes for marvelous-1.4.2.tar.gz
Algorithm Hash digest
SHA256 2609961fecf3ffdadb88564b095278be5e188b42507b46b839d919eee22371a4
MD5 e4851801fd695ed0fbf6d8c44bc65b5d
BLAKE2b-256 4a272502a40896ce5c9561de62721b418b3fcedb3345bd7e22077b050d922f78

See more details on using hashes here.

File details

Details for the file marvelous-1.4.2-py3-none-any.whl.

File metadata

  • Download URL: marvelous-1.4.2-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.8.0-1042-azure

File hashes

Hashes for marvelous-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20233c245c4eb5badfde1f6bb6a5183c5ed07d7536061c949abe7029cf824836
MD5 3a86ac2689ea68b43748ba52373ef992
BLAKE2b-256 41082760a1423e75d0beaea2d63f1185a329e007dea029dc9eb578f42379fa59

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