Skip to main content

Inaza Motor Python SDK

Project description

MotorPy

MotorPy provides a simple interface to the Inaza Motor APIs.

The goal of motorpy and other Inaza libraries and SDKs are to provide a layer of abstraction above the core Inaza services. By doing so, new solutions can be created in a shorter period of time as common areas such as auth, API routing and data parsing is taken care of.


Installation

pip install motorpy


Usage

import motorpy
import asyncio

async def main():
    auth = motorpy.Auth(api_key="<<my api key>>")

    async with motorpy.Motor(org_id='my-org-id', auth=auth, region="eu-1") as motor:
        # the Motor object will return pydantic models with convenience methods
        driver = await motor.get_driver("2c299d7f-7cc3-4e1b-8810-ae180c971c75")

        print(driver.full_name()) # "John Doe"

        ba = await driver.get_primary_billing_account()
        print(ba) # <BillingAccount>

if __name__ == "__main__":
    asyncio.run(main())

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

motorpy-0.1.5b0.tar.gz (53.4 kB view details)

Uploaded Source

Built Distribution

motorpy-0.1.5b0-py3-none-any.whl (80.5 kB view details)

Uploaded Python 3

File details

Details for the file motorpy-0.1.5b0.tar.gz.

File metadata

  • Download URL: motorpy-0.1.5b0.tar.gz
  • Upload date:
  • Size: 53.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for motorpy-0.1.5b0.tar.gz
Algorithm Hash digest
SHA256 2870ed228aa7b372269c6e2d59310281735b4e0811fe01b6d3f77aa4843e2e3a
MD5 0029d692e37d8d6768211b131d544442
BLAKE2b-256 487aeb6f36eb171bc88d6b05ddd4ddeae5bee8a7cccb8719c81a32a4015b26da

See more details on using hashes here.

File details

Details for the file motorpy-0.1.5b0-py3-none-any.whl.

File metadata

  • Download URL: motorpy-0.1.5b0-py3-none-any.whl
  • Upload date:
  • Size: 80.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for motorpy-0.1.5b0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c3863ce04dcbda549357aaa2415962da53ee95c818723af4b2d9a5facf2ee4a
MD5 60ae7eca70c3dbaf6f704f0f1d76ad02
BLAKE2b-256 2ea7e9f7546778668fea2a05d2be6ba1716ff81ad1048baaf0eedd6b33d88876

See more details on using hashes here.

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