Skip to main content

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


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)

Uploaded Source

Built Distribution

apix-0.0a3-py3-none-any.whl (12.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page