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.0rc2

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

Built distribution (wheel)

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

Total release size: 61.2 kB

Release files / anilibria_api_types-1.0.0rc2.tar.gz

Download URL anilibria_api_types-1.0.0rc2.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8e8f7c7a31037c5d28993f8eb1af7788d134a417ae4a9373fd2647a07756377d
BLAKE2b-256 checksum
How to use checksums
fcc5c511d60a03ea176d2326e6c1b7c62b22a240427a9c76f80dbe0e8a54c6e6
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 25, 2026.

Transparency log

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

Download URL anilibria_api_types-1.0.0rc2-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d71a9027624453f01237fde29830e2f79e6427882a7dd89d26f26217d751fb3
BLAKE2b-256 checksum
How to use checksums
845ce327e101b20e51d233458eaafaed54d2a1896d5f1f28710c543c715438b3
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 25, 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