Autogenerated library for communication with
Amun API <https://github.com/thoth-station/amun-api>
_
The swagger definition that is used for generating this swagger client can be
found in Amun API repository in file
amun-api/openapi/openapi.yaml <https://github.com/thoth-station/amun-api/blob/master/openapi/openapi.yaml>
_.
This library is automatically released on changes to PyPI, so you can install it using pip or Pipenv (recommended):
.. code-block:: console
pipenv install amun
You can find autogenerated documentation in the
Amun client <https://github.com/thoth-station/amun-client>
repository,
under the
Documentation directory <https://github.com/thoth-station/amun-client/tree/master/Documentation>
.
To adjust client for a desired remote, you can use the following configuration chages:
.. code-block:: python
from amun.swagger_client import InspectionApi from amun.swagger_client import InspectionSpecification from amun.swagger_client import Configuration from amun.swagger_client import ApiClient from pprint import pprint
configuration = Configuration() configuration.host = 'http://amun-api.your-cluster.redhat.com/api/v1'
api_client = ApiClient(configuration)
api_instance = InspectionApi(api_client) specification = InspectionSpecification(base='fedora:28')
api_response = api_instance.post_inspection(specification) pprint(api_response)
Or you can use the prepared wrapper for this purpose:
.. code-block:: python
from amun import inspect
inspect('http://amun-api.your-cluster.redhat.com/api/v1', base='fedora:28')