Skip to main content

NNTP Library (including compressed headers)

Project description

pre-commit.ci status

pynntp

Python NNTP library.

This package includes advanced NNTP features, including, compressed headers.

The most important (useful) feature of this package over other nntp libraries is the ability to use generators to produce data. This allows for streaming download of large responses to say an XOVER command (which can produce gigabytes of data) and allows you to process the data at the same time is is being received. Meaning that memory use is minimal (even for the largest responses) and that cycles aren't being wasted waiting on a blocking read (even in a single threaded application)

Example

>>> import nntp
>>> nntp_client = nntp.NNTPClient('usenet-host.com', 443, 'user', 'password', use_ssl=True)
>>> nntp_client.date()
datetime.datetime(2013, 10, 19, 6, 11, 41, tzinfo=_tzgmt())
>>> nntp_client.xfeature_compress_gzip()
True
>>> nntp_client.date()
datetime.datetime(2013, 10, 19, 6, 13, 3, tzinfo=_tzgmt())

Supported Commands

NNTP commands that are currently supported include:

  • CAPABILITIES
  • MODE READER
  • QUIT
  • DATE
  • HELP
  • NEWGROUPS
  • NEWNEWS
  • LIST ACTIVE
  • LIST ACTIVE.TIMES
  • LIST NEWSGROUPS
  • LIST OVERVIEW.FMT
  • LIST EXTENSIONS
  • GROUP
  • NEXT
  • LAST
  • ARTICLE
  • HEAD
  • BODY
  • POST
  • XHDR
  • XZHDR
  • XOVER
  • XZVER
  • XPAT
  • XFEATURE COMPRESS GZIP
  • POST

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

pynntp-2.0.1.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

pynntp-2.0.1-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file pynntp-2.0.1.tar.gz.

File metadata

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

File hashes

Hashes for pynntp-2.0.1.tar.gz
Algorithm Hash digest
SHA256 182115c7eb4b922342232a3180a64e979a22d353000e074964611437fbf19bca
MD5 a258c8a5cc4b9c476101e67bd4054c5d
BLAKE2b-256 c190540c7ec41ac5946e623f94a38594881fb6abe78c05f0cfdf08eddbf517b4

See more details on using hashes here.

File details

Details for the file pynntp-2.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pynntp-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 69c70ad52411ac0d8298cb243f86ffcb7ecb3cc267f73a421789faea336e9e6b
MD5 1090fcac9a9daa07feb2a801e3f91e08
BLAKE2b-256 e04bc03bc1b442f80082a3d9db2e49fd2af62ba729bafacce6aedbec0aad97dc

See more details on using hashes here.

Supported by

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