Skip to content

Grayven

PyPI - Python PyPI - Status PyPI - Version PyPI - License

prek Ruff ty

status-badge Read the Docs

A Python wrapper for the Grand Comics Database API.

Installation

Bash
pip install Grayven

Example Usage

Python
from datetime import timedelta
from pathlib import Path

from grayven.grand_comics_database import GrandComicsDatabase

session = GrandComicsDatabase(
    email="email@example.com",
    password="Password",
    cache_path=Path("cache.sqlite"),  # Optional, defaults to ~/.cache/grayven/cache.sqlite
    cache_expiry=timedelta(days=1),  # Optional, defaults to 14 days
    ratelimit_path=Path(
        "ratelimits.sqlite"
    ),  # Optional, defaults to ~/.cache/grayven/ratelimits.sqlite
)

# Search for Series
results = session.list_series(name="Green Lantern")
for series in results:
    print(f"{series.id} | {series.name} ({series.year_began})")

# Get an issue's release date
result = session.get_issue(id=242700)
print(result.on_sale_date)

Documentation

Bugs/Requests

Please use the issue tracker to submit bugs or request features.