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.6.tar.gz (58.2 kB view details)

Uploaded Source

Built Distribution

motorpy-0.1.6-py3-none-any.whl (82.5 kB view details)

Uploaded Python 3

File details

Details for the file motorpy-0.1.6.tar.gz.

File metadata

  • Download URL: motorpy-0.1.6.tar.gz
  • Upload date:
  • Size: 58.2 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.6.tar.gz
Algorithm Hash digest
SHA256 95cdea77ecd218e835cfd8ff29639a5ee4abf1d79606a9bad25ed22763c5e2a3
MD5 1d601cd3c74fbf97b69d102b35685eb8
BLAKE2b-256 f641a9290a6086638aa9fa57d3390ecf8ae40d8c4e686a7e19bd53b777c0f8a4

See more details on using hashes here.

File details

Details for the file motorpy-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: motorpy-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 82.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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8c17e9f1e62e4160cd5b080924653c3bd13be74bf5cef8d42eee05227f03db89
MD5 0315350d053bcb6e8c9a67ff797ff5b6
BLAKE2b-256 1ca7f19f8f9ae4095c1546ddaee0024222b5d77d0447dae72087dee3bff1aa22

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