Client for OpenAPI Petstore
Project description
acme-python-sdk@1.0.0
This is a sample server Petstore server. For this sample, you can use the api key special-key
to test the authorization filters.
Requirements
Python >=3.7
Installing
pip install acme-python-sdk==1.0.0
Getting Started
from pprint import pprint
from acme_client import Acme, ApiException
acme = Acme(
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
host="http://petstore.swagger.io/v2",
)
try:
# Pagination sandbox
paginate_response = acme.miscellaneous.paginate(
first=1, # optional
after="string_example", # optional
)
pprint(paginate_response.body)
pprint(paginate_response.body["edges"])
pprint(paginate_response.body["page_info"])
pprint(paginate_response.headers)
pprint(paginate_response.status)
pprint(paginate_response.round_trip_time)
except ApiException as e:
print("Exception when calling MiscellaneousApi.paginate: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
Async
async
support is available by prepending a
to any method.
import asyncio
from pprint import pprint
from acme_client import Acme, ApiException
acme = Acme(
# Defining the host is optional and defaults to http://petstore.swagger.io/v2
# See configuration.py for a list of all supported configuration parameters.
host="http://petstore.swagger.io/v2",
)
async def main():
try:
# Pagination sandbox
paginate_response = await acme.miscellaneous.apaginate(
first=1, # optional
after="string_example", # optional
)
pprint(paginate_response.body)
pprint(paginate_response.body["edges"])
pprint(paginate_response.body["page_info"])
pprint(paginate_response.headers)
pprint(paginate_response.status)
pprint(paginate_response.round_trip_time)
except ApiException as e:
print("Exception when calling MiscellaneousApi.paginate: %s\n" % e)
pprint(e.body)
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
asyncio.run(main())
Documentation for API Endpoints
All URIs are relative to http://petstore.swagger.io/v2
Class | Method | HTTP request | Description |
---|---|---|---|
MiscellaneousApi | paginate | get /pagination | Pagination sandbox |
PetApi | add | post /pet | Add a new pet to the store |
PetApi | delete | delete /pet/{petId} | Deletes a pet |
PetApi | find_by_status | get /pet/findByStatus | Finds Pets by status |
PetApi | find_by_tags | get /pet/findByTags | Finds Pets by tags |
PetApi | get_by_id | get /pet/{petId} | Find pet by ID |
PetApi | update | put /pet | Update an existing pet |
PetApi | update_with_form | post /pet/{petId} | Updates a pet in the store with form data |
PetApi | upload_image | post /pet/{petId}/uploadImage | uploads an image |
StoreApi | delete_order | delete /store/order/{orderId} | Delete purchase order by ID |
StoreApi | get_inventory | get /store/inventory | Returns pet inventories by status |
StoreApi | get_order_by_id | get /store/order/{orderId} | Find purchase order by ID |
StoreApi | place_order | post /store/order | Place an order for a pet |
UserApi | create | post /user | Create user |
UserApi | create_with_array | post /user/createWithArray | Creates list of users with given input array |
UserApi | create_with_list | post /user/createWithList | Creates list of users with given input array |
UserApi | delete | delete /user/{username} | Delete user |
UserApi | get_by_name | get /user/{username} | Get user by user name |
UserApi | login | get /user/login | Logs user into the system |
UserApi | logout | get /user/logout | Logs out current logged in user session |
UserApi | update | put /user/{username} | Updated user |
Documentation For Models
- ApiResponse
- Category
- CreateWithArrayRequest
- FindByStatus200Response
- FindByStatusResponse
- FindByTags200Response
- FindByTagsResponse
- GetInventoryResponse
- Login200Response
- LoginResponse
- Order
- PaginateRequest
- PaginateResponse
- Pet
- Tag
- UpdateWithFormRequest
- UploadImageRequest
- User
- UserCreateRequest
Author
This Python package is automatically generated by Konfig
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
acme_python_sdk-1.0.0.tar.gz
(75.6 kB
view details)
Built Distribution
File details
Details for the file acme_python_sdk-1.0.0.tar.gz
.
File metadata
- Download URL: acme_python_sdk-1.0.0.tar.gz
- Upload date:
- Size: 75.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08440c7437512970cf0006e01279befb2b8587004908092e9750a4b23640c4e8 |
|
MD5 | eb8576a66267c8e867145533c11fe089 |
|
BLAKE2b-256 | f8bd9e96b97bf657dc8272633f5c8bd7315387b6a45f7eed1e6c420ebec41c1f |
File details
Details for the file acme_python_sdk-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: acme_python_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 217.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ac6035b724b2098f5a9c2cb40127aeca4ac87a57f094b3b447af9e103498e18 |
|
MD5 | d552d22672e8237da13e53348066ac8c |
|
BLAKE2b-256 | a15cf1399d07752267d70b3ed09294c25557b9712d63f5ac6942ff5c7919041c |