prism_rest_client
Project description
prism_rest_client README
==================
This client library is meant for interacting with REST APIs implemented using
the prism_rest library. It may work with other REST APIs as well, but has not
been tested against such.
Getting Started
---------------
>>> import prism_rest_client
>>> api = prism_rest_client.open('http://example.com/api')
>>>
>>> distros = dict(((x.name, x.version), x) for x in api.distros)
>>>
>>> distro = distros.get(('centos', 6))
>>>
>>> pkgs = distro.query('packages', name='bash')
>>>
>>> assert pkgs[0].nevra.name == 'bash'
==================
This client library is meant for interacting with REST APIs implemented using
the prism_rest library. It may work with other REST APIs as well, but has not
been tested against such.
Getting Started
---------------
>>> import prism_rest_client
>>> api = prism_rest_client.open('http://example.com/api')
>>>
>>> distros = dict(((x.name, x.version), x) for x in api.distros)
>>>
>>> distro = distros.get(('centos', 6))
>>>
>>> pkgs = distro.query('packages', name='bash')
>>>
>>> assert pkgs[0].nevra.name == 'bash'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prism_rest_client-0.2.tar.gz
(4.1 kB
view hashes)