Skip to main content

anilibria-api-types

RU | EN

pypi license Python

Typed Pydantic-style stubs for the AniLibria API — method, enum, response, and error classes generated from the OpenAPI schema. The committed files under anilibria_api_types/codegen/ are the deliverable, so running codegen and committing the diff is the work.

Setup

  • Python >=3.13 (via Poetry).
  • .env with MAIN_FOLDER_NAME (see .env.example); anilibria_api_types/config.py reads it and fails without it.

Run codegen

python -m anilibria_api_types.scripts.generate_methods
python -m anilibria_api_types.scripts.generate_enums
python -m anilibria_api_types.scripts.generate_errors
python -m anilibria_api_types.scripts.generate_responses

On Windows with the Poetry venv, prefix with .venv\Scripts\python.exe. The package is a PEP 420 namespace package, so run with -m from the repo root.

Run the whole pipeline (downloads the schema, then all four generators — requires network):

python -m anilibria_api_types.main

Each generator writes to anilibria_api_types/codegen/{methods,enums,errors,responses}/. The schema is cached at anilibria_api_types/temp/schema.json (gitignored); re-download it via validate_schema/download_schema.py.

How it works

  • Each generator is an independent entrypoint in anilibria_api_types/scripts/.
  • Type mapping is centralized in anilibria_api_types/utils/type_map.py:get_type_map.
  • Enum classes are named from the dotted schema path (e.g. enums.anime.releases.release.ageRating → AnimeReleasesReleaseAgeRating), grouped per category.
  • Response models share a single file, anilibria_api_types/codegen/responses/models.py, because the schema's data graph has cycles.
  • Generated method classes import a handwritten BaseMethod from anilibria_api_types.methods.base_method.

CI

  • .github/workflows/codegen-refresh.yml (weekly): regenerates codegen and opens a PR if the committed files change.
  • .github/workflows/python-publish.yml (release): builds and publishes to PyPI.

License

Licensed under The Unlicense.

Metadata

Release files for anilibria-api-types 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anilibria-api-types 1.0.2
File Size Uploaded Provenance Actions
anilibria_api_types-1.0.2.tar.gz 28.0 kB With provenance Details for anilibria_api_types-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anilibria-api-types 1.0.2
File Interpreter ABI Platform Actions
anilibria_api_types-1.0.2-py3-none-any.whl Python 3 none any Details for anilibria_api_types-1.0.2-py3-none-any.whl

Total release size: 63.3 kB

Release files / anilibria_api_types-1.0.2.tar.gz

Download URL anilibria_api_types-1.0.2.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5fd4bec3b3edf163af7b12e6d1a05dedc7718848bd79e54f1d286427cbd17389
BLAKE2b-256 checksum
How to use checksums
04f4154f8930bfcd8c437ee3ad11b055577e21ade1f956710090a4ac871399b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / anilibria_api_types-1.0.2-py3-none-any.whl

Download URL anilibria_api_types-1.0.2-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25b2d0a3c7de3e8096e8d623a0828471e4dea1c81df7fb57aa57b53f414aae30
BLAKE2b-256 checksum
How to use checksums
7da2c4f393583df7ee773fd3c7ef505a828b3b13d786720e6e44b8fc2bb70b95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for anilibria-api-types 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for anilibria_api_types-1.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page