API to Python SDK
Project description
Vector API to SDK.
Python SDK for API automation. Currently supports FastAPI implementation.
It is used as below:
from automation_tool.sdk_automation import PythonSDKBuilder
sdk = PythonSDKBuilder(
url="https://api.vctr.ai",
inherited_properties=['username', 'api_key'],
decorators=['retry()'],
)
sdk.to_python_file(import_strings=['from vectorai.api.utils import retry'])
Sample Output:
# This python file is auto-generated. Please do not edit.
from vectorai.api.utils import retry
class ViAPIClient:
def __init__(self, username, api_key, ):
self.username = username
self.api_key = api_key
@retry()
def request_api_key(self,email, description, referral_code, ):
"""Request an api key
Make sure to save the api key somewhere safe. If you have a valid referral code, you can recieve the api key more quickly.
Args
========
username: Username you'd like to create, lowercase only
email: Email you are using to sign up
description: Description of your intended use case
referral_code: The referral code you've been given to allow you to register for an api key before others
"""
return requests.post(
url='https://api.vctr.ai//project/request_api_key',
json=dict(
username=self.username,
email=email,
description=description,
**kwargs)).json()
Improvements
- Add more documentation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
openapi_to_sdk-0.1.3.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for openapi_to_sdk-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fa0525248a8e584622f9648c239c6d43c44504f7fb878dcf8eb334c728b95af |
|
MD5 | 7bb35ec54a3429e95be840d402624700 |
|
BLAKE2b-256 | 82ba5f5ad15b1422ca9d9608b9deecd467c77b79b4b1c340317366df0144a0bd |