Skip to content

Commit

Permalink
Merge pull request #9 from waylayio/chore/regenerate-staging
Browse files Browse the repository at this point in the history
chore: regenerate storage (sdk-stagingb20240423) 🔁
  • Loading branch information
plankthom authored Apr 24, 2024
2 parents 243b185 + 58392fc commit fcc0f11
Show file tree
Hide file tree
Showing 90 changed files with 789 additions and 490 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,4 @@ jobs:
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: waylay-sdk-storage-types/dist
password: ${{ secrets.PYPI_TYPES_PKG_API_TOKEN }}
packages-dir: waylay-sdk-storage-types/dist
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ test/types/validation_error_stub.py
test/types/venttype_stub.py
test/types/web_script_channel_config_stub.py
test/types/web_script_channel_config_type_stub.py
waylay-sdk-storage-types/README.md
waylay-sdk-storage/README.md
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ typecheck: install ### Run type checks
code-qa: install ### perform code quality checks
@${VENV_TYPES_ACTIVATE} && make exec-code-qa

test: test-types test-notypes ### Run unit tests with and without types installed
test: test-notypes test-types ### Run unit tests with and without types installed

test-types: install-types ### Run unit tests with types installed
@${VENV_TYPES_ACTIVATE} && make exec-test
Expand Down
39 changes: 24 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,67 @@ Manage storage buckets and subscriptions.


This Python package is automatically generated based on the
Waylay Storage OpenAPI specification (API version: v0.4.1)
Waylay Storage OpenAPI specification (API version: 0.4.2)
For more information, please visit [the openapi specification](https://docs.waylay.io/openapi/public/redocly/storage.html).

It consists of two sub-packages that are both plugins for the waylay-sdk package.
It consists of two sub-packages that are both plugins for the waylay-sdk-core package.
- The `waylay-sdk-storage` sub-package contains the Storage api methods.
- The `waylay-sdk-storage-types` sub-package is an extension that contains the typed model classes for all path params, query params, body params and responses for each of the api methods in `waylay-sdk-storage`.

## Requirements.
This package requires Python 3.9+.

## Installation
Typically this package is installed when installing the [waylay-sdk](https://github.com/waylayio/waylay-sdk-py) package to enable the service's functionality.
Typically this package is installed when installing the [waylay-sdk-core](https://pypi.org/project/waylay-sdk/) package to enable the service's functionality.
When the service api methods are required, waylay-sdk-storage is included in:
- ```pip install waylay-sdk[storage]``` to install `waylay-sdk` along with only this service, or
- ```pip install waylay-sdk[services]``` to install `waylay-sdk` along with all services.
- ```pip install waylay-sdk-core[storage]``` to install `waylay-sdk-core` along with only this service, or
- ```pip install waylay-sdk-core[services]``` to install `waylay-sdk-core` along with all services.
When the typed models are required, both waylay-sdk-storage and waylay-sdk-storage-types are included in:
- ```pip install waylay-sdk[storage,storage-types]``` to install `waylay-sdk` along with only this service including the typed models, or
- ```pip install waylay-sdk[services,services-types]``` to install `waylay-sdk` along with all services along with the typed models.
- ```pip install waylay-sdk-core[storage,storage-types]``` to install `waylay-sdk-core` along with only this service including the typed models, or
- ```pip install waylay-sdk-core[services,services-types]``` to install `waylay-sdk-core` along with all services along with the typed models.

## Usage


```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()

# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-storage-types` is installed
from waylay.services.storage.models.tenant_status_report import TenantStatusReport
try:
# Version
# calls `GET /storage/v1/`
api_response = await waylay_client.storage.about.version(
# Status
# calls `GET /storage/v1/status`
api_response = await waylay_client.storage.about.status(
# query parameters:
query = {
'include_buckets': True
'include_queues': True
'include_disk_usage': False
},
)
print("The response of storage.about.version:\n")
print("The response of storage.about.status:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling storage.about.version: %s\n" % e)
print("Exception when calling storage.about.status: %s\n" % e)
```


For more information, please visit the [Waylay API documentation](https://docs.waylay.io/#/api/?id=software-development-kits).

## Documentation for API Endpoints

All URIs are relative to *https://api-aws-dev.waylay.io*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AboutApi* | [**get**](docs/AboutApi.md#get) | **GET** /storage/v1/ | Version
*AboutApi* | [**status**](docs/AboutApi.md#status) | **GET** /storage/v1/status | Status
*AboutApi* | [**version**](docs/AboutApi.md#version) | **GET** /storage/v1/ | Version
*BucketApi* | [**get**](docs/BucketApi.md#get) | **GET** /storage/v1/bucket/{bucket_name} | Get Bucket
*BucketApi* | [**list**](docs/BucketApi.md#list) | **GET** /storage/v1/bucket | List Buckets
*ObjectApi* | [**copy_or_move**](docs/ObjectApi.md#copy_or_move) | **PUT** /storage/v1/bucket/{bucket_name}/{target_path} | Copy Or Move Object
Expand Down
88 changes: 44 additions & 44 deletions docs/AboutApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,56 @@ All URIs are relative to *https://api-aws-dev.waylay.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get**](AboutApi.md#get) | **GET** /storage/v1/ | Version
[**status**](AboutApi.md#status) | **GET** /storage/v1/status | Status
[**version**](AboutApi.md#version) | **GET** /storage/v1/ | Version

# **status**
> status(
> query: StatusQuery,
# **get**
> get(
> headers
> ) -> TenantStatusReport
> ) -> str
Status
Version

Validate consistency of buckets and notification queues for this tenant.
Get the application version.

### Example

```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()

# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-storage-types` is installed
from waylay.services.storage.models.tenant_status_report import TenantStatusReport
try:
# Status
# calls `GET /storage/v1/status`
api_response = await waylay_client.storage.about.status(
# query parameters:
query = {
'include_buckets': True
'include_queues': True
'include_disk_usage': False
},
# Version
# calls `GET /storage/v1/`
api_response = await waylay_client.storage.about.get(
)
print("The response of storage.about.status:\n")
print("The response of storage.about.get:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling storage.about.status: %s\n" % e)
print("Exception when calling storage.about.get: %s\n" % e)
```

### Endpoint
```
GET /storage/v1/status
GET /storage/v1/
```
### Parameters

Name | Type | API binding | Description | Notes
-------- | ----- | ------------- | ------------- | -------------
**query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | |
**query['store']** (dict) <br> **query.store** (Query) | **str** | query parameter `"store"` | | [optional]
**query['include_buckets']** (dict) <br> **query.include_buckets** (Query) | **bool** | query parameter `"include_buckets"` | | [optional] [default True]
**query['include_queues']** (dict) <br> **query.include_queues** (Query) | **bool** | query parameter `"include_queues"` | | [optional] [default True]
**query['include_disk_usage']** (dict) <br> **query.include_disk_usage** (Query) | **bool** | query parameter `"include_disk_usage"` | | [optional] [default False]
This endpoint does not need any parameter.
**headers** | [HeaderTypes](Operation.md#req_headers) | request headers | |

### Return type

Selected path param | Raw response param | Return Type | Description | Links
------------------- | ------------------ | ------------ | ----------- | -----
Literal[""] _(default)_ | False _(default)_ | **`TenantStatusReport`** | | [TenantStatusReport](TenantStatusReport.md)
Literal[""] _(default)_ | False _(default)_ | **`str`** | |
str | False _(default)_ | **`Any`** | If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. |
/ | True | `Response` | The raw http response object.

Expand All @@ -81,57 +67,70 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **version**
> version(
# **status**
> status(
> query: StatusQuery,
> headers
> ) -> str
> ) -> TenantStatusReport
Version
Status

Get the application version.
Validate consistency of buckets and notification queues for this tenant.

### Example

```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()

# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-storage-types` is installed
from waylay.services.storage.models.tenant_status_report import TenantStatusReport
try:
# Version
# calls `GET /storage/v1/`
api_response = await waylay_client.storage.about.version(
# Status
# calls `GET /storage/v1/status`
api_response = await waylay_client.storage.about.status(
# query parameters:
query = {
'include_buckets': True
'include_queues': True
'include_disk_usage': False
},
)
print("The response of storage.about.version:\n")
print("The response of storage.about.status:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling storage.about.version: %s\n" % e)
print("Exception when calling storage.about.status: %s\n" % e)
```

### Endpoint
```
GET /storage/v1/
GET /storage/v1/status
```
### Parameters

This endpoint does not need any parameter.
Name | Type | API binding | Description | Notes
-------- | ----- | ------------- | ------------- | -------------
**query** | [QueryParamTypes](Operation.md#req_arg_query) \| **None** | URL query parameter | |
**query['store']** (dict) <br> **query.store** (Query) | **str** | query parameter `"store"` | | [optional]
**query['include_buckets']** (dict) <br> **query.include_buckets** (Query) | **bool** | query parameter `"include_buckets"` | | [optional] [default True]
**query['include_queues']** (dict) <br> **query.include_queues** (Query) | **bool** | query parameter `"include_queues"` | | [optional] [default True]
**query['include_disk_usage']** (dict) <br> **query.include_disk_usage** (Query) | **bool** | query parameter `"include_disk_usage"` | | [optional] [default False]
**headers** | [HeaderTypes](Operation.md#req_headers) | request headers | |

### Return type

Selected path param | Raw response param | Return Type | Description | Links
------------------- | ------------------ | ------------ | ----------- | -----
Literal[""] _(default)_ | False _(default)_ | **`str`** | |
Literal[""] _(default)_ | False _(default)_ | **`TenantStatusReport`** | | [TenantStatusReport](TenantStatusReport.md)
str | False _(default)_ | **`Any`** | If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. |
/ | True | `Response` | The raw http response object.

Expand All @@ -145,6 +144,7 @@ str | False _(default)_ | **`Any`** | If any other string value for the selected
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | Validation Error | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

4 changes: 2 additions & 2 deletions docs/BucketApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Get a descriptive representation of a bucket.
```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

Expand Down Expand Up @@ -97,7 +97,7 @@ List authorized buckets.
```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

Expand Down
8 changes: 4 additions & 4 deletions docs/ObjectApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Copy or move object to new location.
```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

Expand Down Expand Up @@ -107,7 +107,7 @@ Create a (virtual) folder. * (`all=true`) force creation of a hidden folder,
```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

Expand Down Expand Up @@ -187,7 +187,7 @@ List, inspect or sign objects. * list the objects of a bucket with {object_path
```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

Expand Down Expand Up @@ -285,7 +285,7 @@ Remove the object or folder at {object_path}. An {object_path} ending in a `/`
```python
from pprint import pprint

# Import the waylay-client from the waylay-sdk package
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError

Expand Down
2 changes: 2 additions & 0 deletions docs/Operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ response = await waylay_client.demo.gadgets.combatulate_trinket(
raw_response=False,
select_path=None,
response_type=None,
# optional flag to disable the validation of the request arguments when using typed requests
validate_request=True,
# optional named arguments passed to the http client (named)
timeout=10.0,
)
Expand Down
Loading

0 comments on commit fcc0f11

Please sign in to comment.