Skip to content

Commit c5beb81

Browse files
authored
✨ Upgrade to ACA-Py 0.10.1 (#127)
* version bump * generate client for 0.10.1 * 🎨 remove workaround for faulty revocation response * ✨ new field for presentation models: auto_remove * ✨ new model: V10PresentationSendRequest * ✨ new model: V10CredentialExchangeAutoRemoveRequest * ✨ new model: DIDXRejectRequest * ✨ new model: ConfigurableWriteLedgers * 🚚 model renamed * ✨ empty ServiceDecorator fixed in aca-py PR 2362 * expanded regex validation for DIDXRequest did field * adds new models * ✨ new field in `accept_request`: use_public_did * ✨ new method: post didexchange_conn_id_reject with DIDXRejectRequest * ✨ new body in send_request: V10CredentialExchangeAutoRemoveRequest * 💥 renamed return type (`WriteLedgerRequest` -> `WriteLedger`) and renamed ledger methods: removed `multiple` from names * ✨ new method in ledgerApi: `Fetch list of available write ledgers` and `Set write ledger` * 💥 renamed model in send_presentation: `IndyPresSpec` to `V10PresentationSendRequest` * latest version 0.10.1 * 🐛 OobRecord can still return a ServiceDecorator with missing fields 🤷‍♂️ * version bump * 🎨 Update README * 🎨 Update example * 🎨 * 🎨 * 🎨 * 🔥 * Set version to 0.10.1-rc0 * 🎨 * ⚡ Remove `@validate_call` decorator - fixes memory leak! At the cost of validation * 0.10.1-rc1 * 0.10.1-beta2 * v0.10.1 * 🎨 Update README
1 parent ff063b2 commit c5beb81

File tree

324 files changed

+1908
-1042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+1908
-1042
lines changed

.coverage

-172 KB
Binary file not shown.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## How to contribute
1+
# How to Contribute
22

33
You are encouraged to contribute to the repository by **forking the repo, making your changes and then submitting a pull request back to this repo**.
44

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

README.md

Lines changed: 31 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66
height="250px"
77
/>
88
</p>
9-
<h1 align="center"><b>Aries Cloud Controller Python</b></h1>
9+
<h1 align="center"><b>Aries CloudController Python</b></h1>
1010
<p align="center">
11-
<img
12-
alt="Pipeline Status"
13-
src="https://github.com/didx-xyz/aries-cloudcontroller-python/actions/workflows/python-publish.yml/badge.svg?branch=main"
14-
/>
15-
<a href="https://pypi.org/project/aries-cloudcontroller/">
16-
<img alt="aries-cloudcontroller version" src="https://badge.fury.io/py/aries-cloudcontroller.svg"/>
17-
</a>
11+
<a href="https://pypi.org/project/aries-cloudcontroller/">
12+
<img alt="aries-cloudcontroller version" src="https://badge.fury.io/py/aries-cloudcontroller.svg"/>
13+
</a>
1814
<a
1915
href="https://raw.githubusercontent.com/didx-xyz/aries-cloudcontroller-python/main/LICENSE"
2016
><img
@@ -34,42 +30,39 @@
3430
<a href="#usage">Usage</a> &nbsp;|&nbsp;
3531
<a href="#available-apis">Available APIs</a> &nbsp;|&nbsp;
3632
<a href="#contributing">Contributing</a> &nbsp;|&nbsp;
37-
<a href="#license">License</a>
33+
<a href="#license">License</a>
3834
</p>
3935

40-
The Aries CloudController is a client library, written in Python, for interacting with an [Aries Cloud Agent](https://github.com/hyperledger/aries-cloudagent-python) 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.
36+
The Aries CloudController is a Python-based client library for interacting with an instance of [Aries Cloud Agent](https://github.com/hyperledger/aries-cloudagent-python) (ACA-Py). It leverages the OpenAPI definition from ACA-Py to provide a fully-typed, rich API experience for cloud agent interaction.
37+
38+
**Versioning Update:**
39+
As of version 0.8.0, the Aries CloudController has aligned its versioning with ACA-Py. This means that each new version of ACA-Py will correspond directly to the same version of the Aries CloudController. This change ensures a more straightforward and predictable upgrade path for users.
4140

42-
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.
41+
In other words, CloudController 0.8.0 is compatible with ACA-Py 0.8.0, CloudController 0.9.0 is compatible with ACA-Py 0.9.0, etc.
4342

44-
| Aries Cloud Controller Version | Aries Cloud Agent Python Version |
45-
| ------------------------------ | -------------------------------- |
46-
| 0.5.1-0.5.2 | 0.7.3 |
47-
| 0.6.0-0.6.3 | 0.7.4 |
48-
| 0.7.0 | 0.7.5 |
49-
| 0.8.0 | 0.8.0 |
50-
| 0.8.1 | 0.8.1 |
51-
| 0.8.2 | 0.8.2 |
52-
| 0.9.0 | 0.9.0 |
43+
For legacy versions, please review our release history to found the version compatible with ACA-Py pre-0.8.0.
5344

5445
## Features
5546

56-
Aries Cloud Controller Python is a fully featured client for interacting with ACA-Py.
47+
Aries CloudController Python provides a robust client for interacting with Aries Cloud Agents (ACA-Py).
5748

58-
- Fully Typed wrapper around Aries Cloud Agent Python
59-
- Supports latest ACA-Py version (0.9.0)
60-
- Client is auto generated based on OpenAPI definitions, allowing us to keep up to date with new releases.
61-
- Supports multi-tenant APIs and authentication
62-
- Async API
49+
- **Fully Typed**: Offers a strongly-typed wrapper around the Aries Cloud Agent Python, enhancing developer experience and reducing errors.
50+
- **Up-to-Date Support**: Compatible with the latest ACA-Py version (0.10.1), ensuring access to the most recent features and improvements.
51+
- **Auto-Generated Client**: Utilizes OpenAPI definitions for automatic generation, ensuring timely updates in line with new ACA-Py releases.
52+
- **Multi-Tenancy and Authentication Support**: Facilitates working with multi-tenant APIs and integrates various authentication mechanisms.
53+
- **Asynchronous API**: Supports asynchronous operations, enabling efficient handling of I/O-bound tasks.
6354

6455
## Usage
6556

66-
Aries Cloud Controller Python is published to PyPi and can be installed using pip:
57+
Install Aries Cloud Controller Python via pip:
6758

6859
```sh
6960
pip install aries-cloudcontroller
7061
```
7162

72-
### Creating a client
63+
### Creating a Client
64+
65+
Easily initialize the AcaPyClient:
7366

7467
```python
7568
from aries_cloudcontroller import AcaPyClient
@@ -80,21 +73,16 @@ client = AcaPyClient(
8073
)
8174
```
8275

83-
**Admin insecure mode**
84-
85-
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:
76+
**Admin Insecure Mode**: If running ACA-Py with the `--admin-insecure-mode` flag and without an API key:
8677

8778
```python
8879
client = AcaPyClient(
8980
base_url="http://localhost:8000",
90-
# Explicitly mark that no api key is used
91-
admin_insecure=True
81+
admin_insecure=True # No API key needed
9282
)
9383
```
9484

95-
**Multitenancy**
96-
97-
To provision the agent in the context of specific tenant of the agent, the `tenant_jwt` property must be set:
85+
**Multitenancy**: For specific tenant contexts:
9886

9987
```python
10088
client = AcaPyClient(
@@ -103,23 +91,23 @@ client = AcaPyClient(
10391
)
10492
```
10593

106-
### Interacting with the client
94+
### Interacting with the Client
10795

108-
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.
96+
The API, being fully typed, is best explored through the ACA-Py Swagger UI, which mirrors the available client properties.
10997

110-
For example to create and receive an invitation the following methods can be called:
98+
**Example**: Creating and receiving an invitation:
11199

112100
```python
113101
invitation = await client.connection.create_invitation(
114102
body=CreateInvitationRequest(my_label="Cloud Controller")
115103
)
116104

117-
connection = await client.connection.receive_invitation(body=result.invitation)
105+
connection = await client.connection.receive_invitation(body=invitation.invitation)
118106
```
119107

120108
## Available APIs
121109

122-
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.
110+
The client encompasses various APIs, each corresponding to ACA-Py Swagger UI topics:
123111

124112
- `action_menu`
125113
- `basicmessage`
@@ -151,8 +139,8 @@ Currently the following top-level APIs are available in the client. Each api map
151139

152140
## Contributing
153141

154-
If you would like to contribute to the framework, please read [CONTRIBUTING](/CONTRIBUTING.md) guidelines. These documents will provide more information to get you started!
142+
Contributions are welcome! Please see our [CONTRIBUTING](/CONTRIBUTING.md) guidelines for more information on how to get involved.
155143

156144
## License
157145

158-
Aries Cloud Controller Python is licensed under the [Apache License Version 2.0 (Apache-2.0)](/LICENSE).
146+
This project is licensed under the [Apache License Version 2.0 (Apache-2.0)](/LICENSE).

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Security bugs can be reported via email. The process is as follows:
1616
Email us at: [info at didx.co.za](mailto:info@didx.co.za)
1717

1818
*Note. It is not necessary to include the type of bug if you are not sure how to classify it.*
19-
*A detailed description will be adequate.*
19+
*A detailed description will be adequate.*

aries_cloudcontroller/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
88
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
99
10-
The version of the OpenAPI document: v0.9.0
10+
The version of the OpenAPI document: v0.10.1
1111
Generated by OpenAPI Generator (https://openapi-generator.tech)
1212
1313
Do not edit the class manually.
1414
""" # noqa: E501
1515

1616

17-
__version__ = "0.9.0"
17+
__version__ = "0.10.1"
1818

1919
from aries_cloudcontroller.acapy_client import AcaPyClient
2020

@@ -82,6 +82,7 @@
8282
AttributeMimeTypesResult,
8383
ClaimFormat,
8484
ClearPendingRevocationsRequest,
85+
ConfigurableWriteLedgers,
8586
ConnectionInvitation,
8687
ConnectionList,
8788
ConnectionMetadata,
@@ -120,6 +121,7 @@
120121
DIDEndpointWithType,
121122
DIDList,
122123
DIDResult,
124+
DIDXRejectRequest,
123125
DIDXRequest,
124126
DIFField,
125127
DIFHolder,
@@ -273,6 +275,7 @@
273275
V10CredentialConnFreeOfferRequest,
274276
V10CredentialCreate,
275277
V10CredentialExchange,
278+
V10CredentialExchangeAutoRemoveRequest,
276279
V10CredentialExchangeListResult,
277280
V10CredentialFreeOfferRequest,
278281
V10CredentialIssueRequest,
@@ -287,6 +290,7 @@
287290
V10PresentationExchangeList,
288291
V10PresentationProblemReportRequest,
289292
V10PresentationProposalRequest,
293+
V10PresentationSendRequest,
290294
V10PresentationSendRequestRequest,
291295
V10PresentationSendRequestToProposal,
292296
V20CredAttrSpec,
@@ -342,6 +346,6 @@
342346
WalletListWithGroups,
343347
WalletRecord,
344348
WalletRecordWithGroups,
345-
WriteLedgerRequest,
349+
WriteLedger,
346350
)
347351
from aries_cloudcontroller.util import DEFAULT_PYDANTIC_MODEL_CONFIG

aries_cloudcontroller/api/action_menu_api.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
77
8-
The version of the OpenAPI document: v0.9.0
8+
The version of the OpenAPI document: v0.10.1
99
Generated by OpenAPI Generator (https://openapi-generator.tech)
1010
1111
Do not edit the class manually.
@@ -14,7 +14,7 @@
1414

1515
from typing import Any, Dict, List, Optional, Tuple, Union
1616

17-
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
17+
from pydantic import Field, StrictFloat, StrictInt, StrictStr
1818

1919
try:
2020
from typing import Annotated
@@ -46,7 +46,6 @@ def __init__(self, api_client=None) -> None:
4646
api_client = ApiClient.get_default()
4747
self.api_client = api_client
4848

49-
@validate_call
5049
async def close_active_menu(
5150
self,
5251
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -107,7 +106,6 @@ async def close_active_menu(
107106
response_types_map=_response_types_map,
108107
).data
109108

110-
@validate_call
111109
async def close_active_menu_with_http_info(
112110
self,
113111
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -168,7 +166,6 @@ async def close_active_menu_with_http_info(
168166
response_types_map=_response_types_map,
169167
)
170168

171-
@validate_call
172169
async def close_active_menu_without_preload_content(
173170
self,
174171
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -275,7 +272,6 @@ def _close_active_menu_serialize(
275272
_request_auth=_request_auth,
276273
)
277274

278-
@validate_call
279275
async def fetch_active_menu(
280276
self,
281277
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -336,7 +332,6 @@ async def fetch_active_menu(
336332
response_types_map=_response_types_map,
337333
).data
338334

339-
@validate_call
340335
async def fetch_active_menu_with_http_info(
341336
self,
342337
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -397,7 +392,6 @@ async def fetch_active_menu_with_http_info(
397392
response_types_map=_response_types_map,
398393
)
399394

400-
@validate_call
401395
async def fetch_active_menu_without_preload_content(
402396
self,
403397
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -504,7 +498,6 @@ def _fetch_active_menu_serialize(
504498
_request_auth=_request_auth,
505499
)
506500

507-
@validate_call
508501
async def perform_action(
509502
self,
510503
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -569,7 +562,6 @@ async def perform_action(
569562
response_types_map=_response_types_map,
570563
).data
571564

572-
@validate_call
573565
async def perform_action_with_http_info(
574566
self,
575567
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -634,7 +626,6 @@ async def perform_action_with_http_info(
634626
response_types_map=_response_types_map,
635627
)
636628

637-
@validate_call
638629
async def perform_action_without_preload_content(
639630
self,
640631
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -758,7 +749,6 @@ def _perform_action_serialize(
758749
_request_auth=_request_auth,
759750
)
760751

761-
@validate_call
762752
async def request_active_menu(
763753
self,
764754
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -819,7 +809,6 @@ async def request_active_menu(
819809
response_types_map=_response_types_map,
820810
).data
821811

822-
@validate_call
823812
async def request_active_menu_with_http_info(
824813
self,
825814
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -880,7 +869,6 @@ async def request_active_menu_with_http_info(
880869
response_types_map=_response_types_map,
881870
)
882871

883-
@validate_call
884872
async def request_active_menu_without_preload_content(
885873
self,
886874
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -987,7 +975,6 @@ def _request_active_menu_serialize(
987975
_request_auth=_request_auth,
988976
)
989977

990-
@validate_call
991978
async def send_menu(
992979
self,
993980
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -1052,7 +1039,6 @@ async def send_menu(
10521039
response_types_map=_response_types_map,
10531040
).data
10541041

1055-
@validate_call
10561042
async def send_menu_with_http_info(
10571043
self,
10581044
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],
@@ -1117,7 +1103,6 @@ async def send_menu_with_http_info(
11171103
response_types_map=_response_types_map,
11181104
)
11191105

1120-
@validate_call
11211106
async def send_menu_without_preload_content(
11221107
self,
11231108
conn_id: Annotated[StrictStr, Field(description="Connection identifier")],

0 commit comments

Comments
 (0)