Skip to main content

Twisted API for Red Hat Product Pages

Project description

https://badge.fury.io/py/txproductpages.svg

Access Red Hat Product Pages’s REST API asyncronously (non-blocking) using the Twisted framework.

Simple example: Fetching a release

from txproductpages import Connection
from twisted.internet import defer, reactor


@defer.inlineCallbacks
def example():
    pp = Connection()
    # fetch a release
    try:
        release = yield pp.release('ceph-3-0')
        # release is a Munch (dict-like) object.
        print(release.name)
    except Exception as e:
        print(e)


if __name__ == '__main__':
    example().addCallback(lambda ign: reactor.stop())
    reactor.run()

More Examples

See examples/ directory

Packages that use this package

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

txproductpages-1.1.1.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file txproductpages-1.1.1.tar.gz.

File metadata

  • Download URL: txproductpages-1.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for txproductpages-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9b219859f109deb8bbbea1c57adbc3c7f3c144ad9d16fd483d77090b029e5646
MD5 108e067ebb354a04ac02ff15b1cc98d3
BLAKE2b-256 dbee12c128e79a89f41e1edf4b8c5e4e07284b57537ad4f091fdb65da0db85f2

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