Metadata-Version: 2.4
Name: Simyan
Version: 3.0.0
Summary: A Python wrapper for the Comicvine API.
Project-URL: Documentation, https://simyan.readthedocs.io/en/stable/
Project-URL: Homepage, https://pypi.org/project/Simyan
Project-URL: Issues, https://github.com/Metron-Project/Simyan/issues
Project-URL: Source, https://github.com/Metron-Project/Simyan
Author-email: BuriedInCode <buriedincode@duckpond.nz>
Maintainer-email: BuriedInCode <buriedincode@duckpond.nz>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: comic,comics,metadata
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: pydantic>=2.13.0
Requires-Dist: requests-cache>=1.3.0
Requires-Dist: requests-ratelimiter>=0.10.0
Requires-Dist: requests>=2.34.0
Description-Content-Type: text/markdown

# Simyan

[![PyPI - Python](https://img.shields.io/pypi/pyversions/Simyan.svg?logo=Python&label=Python&style=flat-square)](https://pypi.python.org/pypi/Simyan/)
[![PyPI - Status](https://img.shields.io/pypi/status/Simyan.svg?logo=Python&label=Status&style=flat-square)](https://pypi.python.org/pypi/Simyan/)
[![PyPI - Version](https://img.shields.io/pypi/v/Simyan.svg?logo=Python&label=Version&style=flat-square)](https://pypi.python.org/pypi/Simyan/)
[![PyPI - License](https://img.shields.io/pypi/l/Simyan.svg?logo=Python&label=License&style=flat-square)](https://opensource.org/licenses/GPL-3.0)

[![prek](https://img.shields.io/badge/prek-enabled-informational?logo=prek&style=flat-square)](https://github.com/j178/prek)
[![Ruff](https://img.shields.io/badge/Ruff-enabled-informational?logo=ruff&style=flat-square)](https://github.com/astral-sh/ruff)
[![ty](https://img.shields.io/badge/ty-enabled-informational?logo=ruff&style=flat-square)](https://github.com/astral-sh/ty)

[![Linting](https://github.com/Metron-Project/Simyan/actions/workflows/linting.yaml/badge.svg)](https://github.com/Metron-Project/Simyan/actions/workflows/linting.yaml)
[![Testing](https://github.com/Metron-Project/Simyan/actions/workflows/testing.yaml/badge.svg)](https://github.com/Metron-Project/Simyan/actions/workflows/testing.yaml)
[![Publishing](https://github.com/Metron-Project/Simyan/actions/workflows/publishing.yaml/badge.svg)](https://github.com/Metron-Project/Simyan/actions/workflows/publishing.yaml)
[![Read the Docs](https://img.shields.io/readthedocs/simyan?label=Read-the-Docs&logo=Read-the-Docs)](https://simyan.readthedocs.io/en/stable)

A [Python](https://www.python.org/) wrapper for the [Comicvine API](https://comicvine.gamespot.com/api/).

## Installation

```sh
pip install Simyan
```

### Example Usage

```python
from datetime import timedelta
from pathlib import Path

from simyan.comicvine import Comicvine

session = Comicvine(
    api_key="Comicvine API Key",
    cache_path=Path("cache.sqlite"),  # Optional, defaults to ~/.cache/simyan/cache.sqlite
    cache_expiry=timedelta(days=1),  # Optional, defaults to 14 days
    ratelimit_path=Path(
        "ratelimits.sqlite"
    ),  # Optional, defaults to ~/.cache/simyan/ratelimits.sqlite
)

# Search for Publisher
results = session.list_publishers(params={"filter": "name:DC Comics"})
for publisher in results:
    print(f"{publisher.id} | {publisher.name} - {publisher.site_url}")

# Get details for a Volume
result = session.get_volume(volume_id=26266)
print(result.summary)
```

## Documentation

- [Simyan](https://simyan.readthedocs.io/en/stable)
- [Comicvine API](https://comicvine.gamespot.com/api/documentation)

## Bugs/Requests

Please use the [GitHub issue tracker](https://github.com/Metron-Project/Simyan/issues) to submit bugs or request features.

## Contributing

- When running a new test for the first time, set the environment variable `COMICVINE__API_KEY` to your Comicvine API key.
  The responses will be cached in the `tests/cache.sqlite` database without your key.

## Socials

[![Social - Matrix](https://img.shields.io/matrix/metron-general:matrix.org?label=Metron%20General&logo=matrix&style=for-the-badge)](https://matrix.to/#/#metron-general:matrix.org)
[![Social - Matrix](https://img.shields.io/matrix/metron-devel:matrix.org?label=Metron%20Development&logo=matrix&style=for-the-badge)](https://matrix.to/#/#metron-development:matrix.org)
