This release is a pre-release and may not be stable for production use.
anilibria-api-types
RU | EN
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). .envwithMAIN_FOLDER_NAME(see.env.example);anilibria_api_types/config.pyreads 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
BaseMethodfromanilibria_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.0rc3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anilibria_api_types-1.0.0rc3.tar.gz | 27.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anilibria_api_types-1.0.0rc3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.7 kB
Release files / anilibria_api_types-1.0.0rc3.tar.gz
| Download URL | anilibria_api_types-1.0.0rc3.tar.gz |
|---|---|
| Size | 27.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56a6aac704086dc20aafc2a7839c2470860419cf92739905b0c5e593e79682f9
|
|
BLAKE2b-256 checksum How to use checksums |
34810a61fe53312154152f7762f342d31ea21c6a787c93c8baa042ab0b8a273c
|
| 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 logRelease files / anilibria_api_types-1.0.0rc3-py3-none-any.whl
| Download URL | anilibria_api_types-1.0.0rc3-py3-none-any.whl |
|---|---|
| Size | 35.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
143021fcf2c850d4e47304ce93dbbd5a7a455c2df755960a9919346cf23c9cf7
|
|
BLAKE2b-256 checksum How to use checksums |
50fb46de7ebe453a46ab4e4a72079690939c2ceb87abb990e763b1e9443b70d0
|
| 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