Skip to main content

A spec compliant parser and meta editor for NZB files

Project description


Logo

A spec compliant parser and meta editor for NZB files

PyPI - Version PyPI - Python Version License Checked with mypy Ruff

GitHub Workflow Status (with event) GitHub Actions Workflow Status codecov

Table Of Contents

About

A spec compliant parser and meta editor for NZB files.

Installation

nzb is available on PyPI, so you can simply use pip to install it.

pip install nzb

Usage

from nzb import NZBParser

nzb = NZBParser.from_file("Big Buck Bunny - S01E01.mkv.nzb").parse()

print(f"{nzb.file.name} ({nzb.file.size.human_readable()})")
#> Big Buck Bunny - S01E01.mkv (16.7MiB)

for file in nzb.files:
    print((file.name, file.size, file.datetime.isoformat(), file.groups))
    #> ("Big Buck Bunny - S01E01.mkv", 17521761, "2024-01-28T11:18:28+00:00", ("alt.binaries.boneless",))
    #> ("Big Buck Bunny - S01E01.mkv.par2", 1089, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))
    #> ("Big Buck Bunny - S01E01.mkv.vol00+01.par2", 741017, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))
    #> ("Big Buck Bunny - S01E01.mkv.vol01+02.par2", 1480494, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))
    #> ("Big Buck Bunny - S01E01.mkv.vol03+04.par2", 2960528, "2024-01-28T11:18:29+00:00", ("alt.binaries.boneless",))

Docs

Checkout the complete documentation here.

License

Distributed under the Unlicense License. See UNLICENSE for more information.

Project details


Download files

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

Source Distribution

nzb-0.2.0.tar.gz (144.3 kB view details)

Uploaded Source

Built Distribution

nzb-0.2.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file nzb-0.2.0.tar.gz.

File metadata

  • Download URL: nzb-0.2.0.tar.gz
  • Upload date:
  • Size: 144.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for nzb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f4e4b011cfe1ce44dea72e386e7a8757026e2e1431586c971633a7804d1130c1
MD5 a72ca82da27fccf3beef7f6497fc1def
BLAKE2b-256 63e049500a2d292995840f003ab24734b53eda93a47b42f2dea9e7605b3e4735

See more details on using hashes here.

File details

Details for the file nzb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nzb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for nzb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f4d28094233530801a379ffd085146d6deb268c2767537b3c121f44c4e4c787
MD5 9b8ffb59d93f3ac929aa4f773c8e5516
BLAKE2b-256 0eb5a342524736b2ef48abe177f05481817040af13604820a45fe8cc0a13216b

See more details on using hashes here.

Supported by

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