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.4.0-py3-none-win_amd64.whl (2.0 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

pyaniparser-0.4.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.4.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: pyaniparser-0.4.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.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6adafa128ef3f95efc56fb9da87d074229d4938496cc7649d6be56327e301e77
MD5 ba6205861e22534ddc0e470d6a8a2e7a
BLAKE2b-256 3a8afd9d9b458b7e6c8bbf929c9d7619e63f28350dc69484e4972b019670e7a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.4.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.4.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.4.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ea22c7f986340b14121301a26ebc463e01a13289a6b3b593bdf2ff94c6f7a9d9
MD5 34c4f9ede9ef882fe57e2fc1b7fcad51
BLAKE2b-256 27b60a626b53bac0ce1e9f696281ccc5873ca25f1e331ebd1ff033f7ba334838

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.4.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.4.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.4.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c4af697384caa4b395a0b5a84c7d050c8ce81247dfe0368ac36afaa42740f686
MD5 a8feeefe631e4bd6b2b0fa8017c7c7a3
BLAKE2b-256 9788fd99251badb661d75fde3ea5c15eb80dad4ca505616638102e1306659f91

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.4.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.4.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c2b43e3a647180e3bed8b452b119f3ea4f2efef883ec57c54b32271f50f2960
MD5 d1f1dee1545da927ecb2ee004d6ea60d
BLAKE2b-256 8cdd1ccf49f90868b77c1bd92b6a0427b09c015ce9caabab583c9f78d2fd7b84

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.4.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.4.0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyaniparser-0.4.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 28a59966e5fda40f4e7da3587ca44a6bbb3039467ccdcc8890876379dec2828e
MD5 c1a4f2324cf3ae1e81caac51c8142799
BLAKE2b-256 1d0b255449e48a1a5417d25d375df345cceecdae7c8bba2e0bbdb3d642789006

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyaniparser-0.4.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