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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95cdea77ecd218e835cfd8ff29639a5ee4abf1d79606a9bad25ed22763c5e2a3
|
|
| MD5 |
1d601cd3c74fbf97b69d102b35685eb8
|
|
| BLAKE2b-256 |
f641a9290a6086638aa9fa57d3390ecf8ae40d8c4e686a7e19bd53b777c0f8a4
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c17e9f1e62e4160cd5b080924653c3bd13be74bf5cef8d42eee05227f03db89
|
|
| MD5 |
0315350d053bcb6e8c9a67ff797ff5b6
|
|
| BLAKE2b-256 |
1ca7f19f8f9ae4095c1546ddaee0024222b5d77d0447dae72087dee3bff1aa22
|