Skip to main content

SAURES API client

Project description

SAURES API Client

SAURES API client

Stage: Alpha

Installation

  1. From this repository (poetry required)
  • git clone https://github.com/Yurzs/saures_api_client.git
  • cd saures_api_client
  • poetry install --no-dev
  1. From PyPi
  • pip install saures_api_client

Usage

  1. You can use all the api methods like they are named in SAURES API docs:
from saures_api_client import SauresAPIClient

async def main():
    client = SauresAPIClient("your email", "your password")

    objects = await client.user_objects()

...
  1. Or you can use more user-friendly wrapper around the client:
from saures_api_client import SauresAPIClient
from saures_api_client import types

async def main():
    user = SauresAPIClient.get_user("your email", "your password")
    
    locations = await user.get_locations()
    # returns typing.List[types.Location]
    
    location = locations[0]
    location_controllers = await location.get_controllers()
    # returns typing.List[types.Controller]
    # so you can easily propagate deeper in entities without
    # specifically providing their IDs to the client.

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

saures_api_client-0.1.2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

saures_api_client-0.1.2-py3-none-any.whl (7.3 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