A Python wrapper for the Metron API. https://pypi.org/p/Seagrin/
Find a file
renovate-bot 11d04dd5dd
All checks were successful
ci/woodpecker/push/testing/3 Pipeline was successful
ci/woodpecker/push/testing/2 Pipeline was successful
ci/woodpecker/push/testing/1 Pipeline was successful
ci/woodpecker/push/testing/5 Pipeline was successful
ci/woodpecker/push/linting Pipeline was successful
ci/woodpecker/push/testing/4 Pipeline was successful
ci/woodpecker/push/publishing Pipeline was successful
chore(deps): lock file maintenance (#47)
Co-authored-by: renovate-bot <renovate-bot_bic@noreply.codeberg.org>
Co-committed-by: renovate-bot <renovate-bot_bic@noreply.codeberg.org>
2026-04-13 14:08:31 +02:00
.woodpecker ReadingList Conditional Cache (#20) 2026-03-18 20:00:10 +01:00
docs Update list of if-modified-since endpoints (#17) 2026-03-12 06:40:28 +01:00
seagrin ReadingList Conditional Cache (#20) 2026-03-18 20:00:10 +01:00
tests Refine cache (#8) 2026-03-03 20:12:23 +01:00
.gitattributes Initial Commit 2026-02-19 06:13:22 +13:00
.gitignore Refine cache (#8) 2026-03-03 20:12:23 +01:00
.readthedocs.yaml Switch from mkdocs to zensical 2026-02-19 13:44:37 +13:00
LICENSE Initial Commit 2026-02-19 06:13:22 +13:00
prek.toml Update list of if-modified-since endpoints (#17) 2026-03-12 06:40:28 +01:00
pyproject.toml Update list of if-modified-since endpoints (#17) 2026-03-12 06:40:28 +01:00
README.md Migrate Pre-commit to Prek (#11) 2026-03-05 06:20:44 +01:00
renovate.json Initial Commit 2026-02-19 06:13:22 +13:00
uv.lock chore(deps): lock file maintenance (#47) 2026-04-13 14:08:31 +02:00
zensical.toml Refine cache (#8) 2026-03-03 20:12:23 +01:00

Seagrin

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

prek Ruff Ty

status-badge Read the Docs

A Python wrapper for the Metron API.

Installation

pip install seagrin

Example Usage

from datetime import timedelta

from seagrin.metron import Metron
from seagrin.cache import SQLiteCache, CachePolicy

policy = Cache(percent=0.1, expiry=timedelta(days=14))
# Policy defaults to 10% and 14 days
session = Metron(username="Username", password="Password", cache=SQLiteCache(), policy=policy)

# Get all Marvel comics for the week of 2026-01-19
this_week = session.list_issues(
    params={
        "store_date_range_after": "2026-01-19",
        "store_date_range_before": "2026-01-26",
        "publisher_name": "marvel",
    }
)

# Print the results
for iss in this_week:
    print(f"{iss.id} {iss.issue_name}")

# Retrieve the detail for an individual issue
asm_68 = session.issue(issue_id=31660)

# Print the issue Description
print(asm_68.desc)

Documentation

Bugs/Requests

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

Socials

Social - Fosstodon Social - Matrix