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.0.tar.gz (5.7 kB view hashes)

Uploaded Source

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