Twisted API for Red Hat Product Pages
Project description
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
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.0.0.tar.gz
(4.7 kB
view details)
File details
Details for the file txproductpages-1.0.0.tar.gz
.
File metadata
- Download URL: txproductpages-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d28b2f463799da1ee01a5af3cd8bcd86aa7a0a58a878de6bfe1cd0a650f5d8e4 |
|
MD5 | 344efbc4580ac9790480e46af4e87f76 |
|
BLAKE2b-256 | da576f7bdbab3c3461cf64e33da81aa5738faeb451ba77f286e9ab1ed776b04e |