No project description provided
Project description
apix
Example
# models.py
from apix import Schema, Path, PathInfo
class Data(Schema):
key: str
value: str
class GetData(Path[Data]):
__info__ = PathInfo("GET", "/data", Data)
key: str
# sync.py
from apix.sync import SyncClient
class MySyncClient(SyncClient):
BASE_URL = "https://my.api"
def get_data(self, key: str) -> Data:
return self(GetData(key=key))
# main.py
from apix import Config
with MySyncClient() as client:
print(client.get_data("Key")) # "Value"
Serializers
Http Clients
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
apix-0.0a3.tar.gz
(7.7 kB
view hashes)
Built Distribution
apix-0.0a3-py3-none-any.whl
(12.4 kB
view hashes)