A simple python client for controlling an ACA-Py agent
Project description
Aries Cloud Controller Python
Features | Usage | Available APIs | Contributing | License
The Aries CloudController is a client library, written in Python, for interacting with an Aries Cloud Agent instance. It is generated based on the OpenAPI definition provided by ACA-Py, giving a fully-typed, rich API for interacting with the cloud agent.
Each Cloud Controller version maps to a specific ACA-Py version, which is outlined in the table below. Although not strictly adhered to in the past, a new ACA-Py version will result in a new Minor version bump for the Cloud Controller, as there are often times breaking changes.
Aries Cloud Controller Version | Aries Cloud Agent Python Version |
---|---|
0.5.1-0.5.2 | 0.7.3 |
0.6.0-0.6.3 | 0.7.4 |
0.7.0 | 0.7.5 |
0.8.0 | 0.8.0 |
0.8.1 | 0.8.1 |
0.8.2 | 0.8.2 |
0.9.0 | 0.9.0 |
Features
Aries Cloud Controller Python is a fully featured client for interacting with ACA-Py.
- Fully Typed wrapper around Aries Cloud Agent Python
- Supports latest ACA-Py version (0.9.0)
- Client is auto generated based on OpenAPI definitions, allowing us to keep up to date with new releases.
- Supports multi-tenant APIs and authentication
- Async API
Usage
Aries Cloud Controller Python is published to PyPi and can be installed using pip:
pip install aries-cloudcontroller
Creating a client
from aries_cloudcontroller import AcaPyClient
client = AcaPyClient(
base_url="http://localhost:8000",
api_key="myApiKey"
)
Admin insecure mode
If you are running ACA-Py with the admin insecure flag and don't have the API key, you must set the admin_insecure
property:
client = AcaPyClient(
base_url="http://localhost:8000",
# Explicitly mark that no api key is used
admin_insecure=True
)
Multitenancy
To provision the agent in the context of specific tenant of the agent, the tenant_jwt
property must be set:
client = AcaPyClient(
base_url="http://localhost:8000",
tenant_jwt="eyXXX"
)
Interacting with the client
Once you have the client set up, you're ready to interact with it. Because the API is fully typed, the best way to know what is available is by looking at the ACA-Py swagger UI, and the available properties on the client.
For example to create and receive an invitation the following methods can be called:
invitation = await client.connection.create_invitation(
body=CreateInvitationRequest(my_label="Cloud Controller")
)
connection = await client.connection.receive_invitation(body=result.invitation)
Available APIs
Currently the following top-level APIs are available in the client. Each api maps to the topics as used by the ACA-Py swagger UI.
action_menu
basicmessage
connection
credential_definition
credentials
default
did_exchange
discover_features
discover_features_v2_0
endorse_transaction
introduction
issue_credential_v1_0
issue_credential_v2_0
jsonld
ledger
mediation
multitenancy
out_of_band
present_proof_v1_0
present_proof_v2_0
resolver
revocation
schema
server
settings
trustping
wallet
Contributing
If you would like to contribute to the framework, please read CONTRIBUTING guidelines. These documents will provide more information to get you started!
License
Aries Cloud Controller Python is licensed under the Apache License Version 2.0 (Apache-2.0).
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
Built Distribution
Hashes for aries_cloudcontroller-0.9.0.post2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86f022db934287f75dbb15dcccb70d895a0e249f7983a0558f797798e4dd3bf5 |
|
MD5 | 3221aa216cb6dbe535160a444e2c7fcb |
|
BLAKE2b-256 | ffe872596cbf2395e14ebe7b8b564e849df6e0cc60a3e4ecd567c391f164e708 |
Hashes for aries_cloudcontroller-0.9.0.post2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a5a8d2e62ada64452ea60b8e34e5be9db58476616520e16e5815b311327fd48 |
|
MD5 | eb3b81e3f60ec7d06803f8cd487b401d |
|
BLAKE2b-256 | 8bff9652855164a43877604514479dd860295ed675c8cfccffd68bebfdb0476f |