Skip to main content

A fully-typed Python client for the Marvel Comics API.

Project description

Marvelpy

PyPI version Python 3.8+ License: MIT Documentation

A fully-typed Python client for the Marvel Comics API.

Features

  • 🚀 Async-first design - Built with modern async/await patterns
  • 🔒 Fully typed - Complete type hints for better IDE support
  • 📚 Comprehensive - Full coverage of the Marvel Comics API
  • 🛡️ Enterprise-ready - Production-grade error handling and retry logic
  • 📖 Well documented - Extensive documentation and examples

Quick Start

Installation

pip install marvelpy

Basic Usage

import marvelpy

# Get a hello message
message = marvelpy.hello_world()
print(message)  # "Hello from Marvelpy!"

What's Available

Currently, Marvelpy v0.1.0 includes:

  • Hello World Function - Basic demonstration functionality
  • Complete test suite - 100% test coverage
  • Type safety - Full type hints throughout
  • Documentation - Comprehensive docs with examples

Coming Soon

The full Marvel Comics API client will include:

  • Characters - Search and retrieve character information
  • Comics - Access comic book data and metadata
  • Events - Marvel universe events and storylines
  • Series - Comic series information
  • Stories - Individual story details
  • Creators - Creator and artist information

Example Future Usage

# This is planned functionality - not yet implemented
import marvelpy

# Initialize the client
client = marvelpy.MarvelClient(api_key="your_key", private_key="your_private_key")

# Search for characters
characters = await client.characters.search("spider-man")

# Get character details
spiderman = await client.characters.get(1009610)

# Search comics
comics = await client.comics.search("amazing spider-man")

Requirements

  • Python 3.8 or higher
  • httpx>=0.23.0
  • pydantic>=1.10.0
  • typing-extensions>=4.9.0
  • click>=8.1.0

Development

Setup

git clone https://github.com/jlgranof/marvelpy.git
cd marvelpy
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e ".[dev]"

Testing

pytest
pytest --cov=marvelpy --cov-report=html

Documentation

mkdocs serve  # Serve docs locally
mkdocs build  # Build docs

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.

Links


Note: This package is currently in early development. The initial release (v0.1.0) includes basic functionality with a hello world example. Full Marvel API integration is coming soon!

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

marvelpy-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

marvelpy-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file marvelpy-0.1.0.tar.gz.

File metadata

  • Download URL: marvelpy-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for marvelpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 988948db80f09663c8dffdff14109807435462ee8c0aa09efff4a026f210051c
MD5 490833bae3b8f3dd9ab3d5764a222f29
BLAKE2b-256 14f760aaa063ece70ec5b38e06c12f3aba6e4b9eb07d25c1858cc433a9060764

See more details on using hashes here.

File details

Details for the file marvelpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: marvelpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for marvelpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82e5599a9507290db02a9174cd614d77b72ee2c89e3d7550e88c87c9bee66918
MD5 70ff947981d0987d915ed94343d8ac17
BLAKE2b-256 f9dfd21d8e0ea202be431a3f06fcb8f379b6ebd1439fe7afb03b6fc5be6814ef

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