Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/im-cloud-spain-connectors/python-connect-api-facades
Easy to use facades for the Connect Open API.
https://github.com/im-cloud-spain-connectors/python-connect-api-facades
client component connect facade open-api python
Last synced: about 2 months ago
JSON representation
Easy to use facades for the Connect Open API.
- Host: GitHub
- URL: https://github.com/im-cloud-spain-connectors/python-connect-api-facades
- Owner: IM-Cloud-Spain-Connectors
- License: apache-2.0
- Created: 2023-01-16T11:37:34.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-03T13:00:14.000Z (about 1 year ago)
- Last Synced: 2024-10-13T23:41:20.395Z (3 months ago)
- Topics: client, component, connect, facade, open-api, python
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Connect API Facades
[![Test](https://github.com/othercodes/python-connect-api-facades/actions/workflows/test.yml/badge.svg)](https://github.com/othercodes/python-connect-api-facades/actions/workflows/test.yml)
Easy to use facades for the Connect Open API.
## Installation
The easiest way to install the Connect API Facades library is to get the latest version from PyPI:
```bash
# using poetry
poetry add rndi-connect-api-facades
# using pip
pip install rndi-connect-api-facades
```## The Contracts
This package provides the following contracts or interfaces:
* AssetManagementService
## The Adapters
The facade works as the adapter for the interfaces, it also adds new functionality to enhance the experience, to use it,
just instantiate the `ConnectOpenAPIFacade` injecting an API instance.```python
from rndi.connect.api_facades.facade import ConnectOpenAPIFacadeapi = ConnectOpenAPIFacade(client)
api.find_asset('AS-XXXX-XXXX-XXXX')
```Optionally, you can import and use standalone mixing facades for each API endpoint:
```python
from rndi.connect.api_facades.assets.mixins import WithAssetFacadeclass MyCustomClass(WithAssetFacade):
def __init__(self, client):
self.client = clientapi = MyCustomClass(client)
api.find_asset('AS-XXXX-XXXX-XXXX')
```