Skip to main content

Python wrapper for Banned.AniParser (NativeAOT C ABI)

Project description

PyAniParser

中文文档 | English Doc

PyAniParser is a high-performance Python wrapper for Banned.AniParser, designed to parse anime file names. Powered by .NET 10 Native AOT, it provides fast and accurate extraction of metadata (titles, episodes, resolutions, etc.) from complex file naming conventions.

Note: This parser is currently optimized for Chinese fansub naming conventions (e.g., VCB-Studio, Nekomoe, Sakurato).

Features

  • High Performance: Built with .NET Native AOT for speed and efficiency.
  • Robust Parsing: specialized in handling complex naming schemes from various release groups.
  • Batch Processing: Optimized for processing large lists of files.
  • Globalization Support: Built-in Traditional to Simplified Chinese conversion.
  • Type Hinting: Fully typed for better IDE support and development experience.

Installation

pip install pyaniparser

Usage

Basic Usage

from pyaniparser import AniParser

# Initialize the parser
parser = AniParser()

# Parse a single file
result = parser.parse("[Nekomoe] Anime Title - 01 [1080p].mp4")
if result:
    print(f"Title: {result.title}")
    print(f"Episode: {result.episode}")

# Parse a batch of files (Recommended for lists)
files = ["File1.mp4", "File2.mp4"]
results = parser.parse_batch(files)

for item in results:
    print(item.title)

Advanced Configuration (Globalization)

You can configure the parser to automatically convert Traditional Chinese titles to Simplified Chinese (or vice versa) upon initialization:

# Options: "Simplified", "Traditional", or "NotChange" (Default)
parser = AniParser(globalization="Simplified")

result = parser.parse("[Group] 繁體標題 - 01.mp4")
print(result.title) # Output will be converted to Simplified Chinese

Get Supported Groups

You can retrieve the list of currently supported subtitle and release groups programmatically:

parser = AniParser()
groups = parser.get_parser_list()
print(groups)

Supported Groups

PyAniParser includes built-in support for many major groups, including but not limited to:

  • ANi
  • 北宇治字幕组
  • 喵萌奶茶屋
  • 桜都字幕组
  • Vcb-Studio

For a complete list of supported groups, please refer to the Upstream Documentation.

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

Contribution

Issues and Pull Requests are welcome!

Since this is a wrapper, parsing logic issues should be reported to the Core .NET Repository, while Python binding issues can be reported here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyaniparser-0.3.0-py3-none-win_amd64.whl (2.0 MB view details)

Uploaded Python 3Windows x86-64

pyaniparser-0.3.0-py3-none-manylinux_2_17_x86_64.whl (2.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

pyaniparser-0.3.0-py3-none-manylinux_2_17_aarch64.whl (1.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

pyaniparser-0.3.0-py3-none-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

pyaniparser-0.3.0-py3-none-macosx_10_9_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file pyaniparser-0.3.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: pyaniparser-0.3.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyaniparser-0.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 eef804e7d43a417b326b5e0d33610c7332751eb2a5c9128c14f79e3bb61dccf0
MD5 36bf5bb4c1451e3187caddd242896e75
BLAKE2b-256 fe14f06fdbd05b26878f1a71b2353a16bac6b8c4d9dbb86a37dfea970c2c3612

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.3.0-py3-none-win_amd64.whl:

Publisher: publish.yml on banned2054/PyAniParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaniparser-0.3.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.3.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 88d503f3daaccf9ad9d266286ad363fdf38f9d7ae9847657664a331a4898137b
MD5 8283bfda79aeceecc67b2652de44da50
BLAKE2b-256 28f7e7737ab7013d9edfae14c750c7f412cd845177eb7ae03c0e6b8487c35a03

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.3.0-py3-none-manylinux_2_17_x86_64.whl:

Publisher: publish.yml on banned2054/PyAniParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaniparser-0.3.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.3.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 70940b665772d5e7cecb36e936f30505eb53a1a5a642ef9108871394a17fcc2e
MD5 46ccfb75f21049081d552a6240c78f4c
BLAKE2b-256 6ae982da12e6e178f2c4ae3906e609aec96e0007f3f6c60891ebed3e8198189a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.3.0-py3-none-manylinux_2_17_aarch64.whl:

Publisher: publish.yml on banned2054/PyAniParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaniparser-0.3.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d132f5cec9ac925441ddd448e5e28eae6bd5e1740fa2084d2ff64f279ae66156
MD5 f5b51771602ab1942938b469441c0e55
BLAKE2b-256 50b07bc77c5430cb3be5dcae6b471cb107564f9c796ea233d9a66425b06dc091

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.3.0-py3-none-macosx_11_0_arm64.whl:

Publisher: publish.yml on banned2054/PyAniParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyaniparser-0.3.0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.3.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b6dfbfda2439a44197ceb7b1ebbefe05225fe733312ad1dda3d03bad2c171d72
MD5 8eedd690487a86b8945f40cc02ff34bc
BLAKE2b-256 81d3d0f815903f4ca7e6007079da8e6d7e44750ce250e82581683c877f15650e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.3.0-py3-none-macosx_10_9_x86_64.whl:

Publisher: publish.yml on banned2054/PyAniParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page