Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

Release files for anilibria-api-types 1.0.0rc1

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.0rc1
File Size Uploaded
anilibria_api_types-1.0.0rc1.tar.gz 25.8 kB Details

Built distribution (wheel)

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

Total release size: 59.3 kB

Release files / anilibria_api_types-1.0.0rc1.tar.gz

Download URL anilibria_api_types-1.0.0rc1.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2a316ba8e410b9ff05c3a05163fa82d09ab7b87c045e85b4261f4a7076315c55
BLAKE2b-256 checksum
How to use checksums
719f4e73c076e2d0825557cd9525887d3c4d22eee5ff8212a7de2f6ebb1f9521
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 23, 2026.

Transparency log

Release files / anilibria_api_types-1.0.0rc1-py3-none-any.whl

Download URL anilibria_api_types-1.0.0rc1-py3-none-any.whl
Size 33.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
173c6da24de4e897b13465c7d6aaa9663e692a09466c3377dadffce9ce766ac7
BLAKE2b-256 checksum
How to use checksums
35217db398f5308c3c369632b3be7a58b9c3cb4bc2b6ff74546a9cb7fa37c6c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 23, 2026.

Transparency log
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