A Python wrapper for the Metron API.
https://pypi.org/p/Seagrin/
- Python 100%
|
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
Co-authored-by: renovate-bot <renovate-bot_bic@noreply.codeberg.org> Co-committed-by: renovate-bot <renovate-bot_bic@noreply.codeberg.org> |
||
|---|---|---|
| .woodpecker | ||
| docs | ||
| seagrin | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .readthedocs.yaml | ||
| LICENSE | ||
| prek.toml | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json | ||
| uv.lock | ||
| zensical.toml | ||
Seagrin
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.