https://github.com/thoth-station/amun-client
A library for communicating with Amun API
https://github.com/thoth-station/amun-client
artificial-intelligence hacktoberfest thoth
Last synced: about 2 months ago
JSON representation
A library for communicating with Amun API
- Host: GitHub
- URL: https://github.com/thoth-station/amun-client
- Owner: thoth-station
- License: gpl-3.0
- Created: 2018-09-24T07:10:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T08:32:49.000Z (over 2 years ago)
- Last Synced: 2025-03-24T13:51:25.246Z (2 months ago)
- Topics: artificial-intelligence, hacktoberfest, thoth
- Language: Python
- Homepage:
- Size: 308 KB
- Stars: 2
- Watchers: 8
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Amun Client
-----------Autogenerated library for communication with
`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 `_.Installation
============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
# or use pip
# pip3 install amunUsage
=====You can find autogenerated documentation in the
`Amun client `_ repository,
under the
`Documentation directory `_.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# Adjust remote to communicate with:
configuration = Configuration()
configuration.host = 'http://amun-api.your-cluster.redhat.com/api/v1'# Apply this configuration to API client:
api_client = ApiClient(configuration)# Use the customized API client to talk to the remote API:
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')