Skip to main content

NNTP Library (including compressed headers)

Project description

pynntp

Python NNTP library.

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

The most important (useful) feature of this package over other nntp libaries is the ablity 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.

Files for pynntp, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size pynntp-1.0.2.tar.gz (20.2 kB) File type Source Python version None Upload date Hashes View
Filename, size pynntp-1.0.2-py2.py3-none-any.whl (34.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page