Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ktdreyer/txproductpages
Async interface to Red Hat Product Pages, using Twisted
https://github.com/ktdreyer/txproductpages
Last synced: 7 days ago
JSON representation
Async interface to Red Hat Product Pages, using Twisted
- Host: GitHub
- URL: https://github.com/ktdreyer/txproductpages
- Owner: ktdreyer
- License: mit
- Created: 2018-03-23T21:05:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-04T22:29:00.000Z (almost 4 years ago)
- Last Synced: 2024-10-05T23:05:03.760Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Async interface to Red Hat Product Pages, using Twisted
=======================================================.. image:: https://github.com/ktdreyer/txproductpages/workflows/tests/badge.svg
:target: https://github.com/ktdreyer/txproductpages/actions.. image:: https://badge.fury.io/py/txproductpages.svg
:target: https://badge.fury.io/py/txproductpagesAccess Red Hat Product Pages's REST API asyncronously (non-blocking) using the
Twisted framework.Simple example: Fetching a release
----------------------------------.. code-block:: python
from txproductpages import Connection
from twisted.internet import defer
from twisted.internet.task import react@defer.inlineCallbacks
def example(reactor):
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__':
react(example)More Examples
-------------See ``examples/`` directory
Packages that use this package
------------------------------* `helga-productpages `_