No project description provided
Project description
🍕 Dodo IS API Wrapper
Installation
Via pip:
pip install dodo-is-api
Via poetry:
poetry add dodo-is-api
📝 Changelog is here.
🧪 Usage:
🌩️ Synchronous version:
from datetime import datetime
from uuid import UUID
import httpx
from dodo_is_api import models
from dodo_is_api.connection.synchronous import DodoISAPIConnection
def main():
access_token = 'your access token'
country_code = models.CountryCode.RU
from_date = datetime(2004, 10, 7)
to_date = datetime(2004, 10, 7, 23)
units = [UUID('ec81831c-b8a7-4ba8-a6aa-7ae7d0c4e0bb')]
with httpx.Client() as http_client:
connection = DodoISAPIConnection(
http_client=http_client,
access_token=access_token,
country_code=country_code,
)
stop_sales = connection.get_stop_sales_by_products(
from_date=from_date,
to_date=to_date,
units=units,
)
print(stop_sales)
if __name__ == '__main__':
main()
⚡️ Asynchronous version:
import asyncio
from datetime import datetime
from uuid import UUID
import httpx
from dodo_is_api import models
from dodo_is_api.connection.asynchronous import AsyncDodoISAPIConnection
async def main():
access_token = 'your access token'
country_code = models.CountryCode.RU
from_date = datetime(2004, 10, 7)
to_date = datetime(2004, 10, 7, 23)
units = [UUID('ec81831c-b8a7-4ba8-a6aa-7ae7d0c4e0bb')]
with httpx.AsyncClient() as http_client:
connection = AsyncDodoISAPIConnection(
http_client=http_client,
access_token=access_token,
country_code=country_code,
)
stop_sales = await connection.get_stop_sales_by_products(
from_date=from_date,
to_date=to_date,
units=units,
)
print(stop_sales)
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
dodo_is_api-0.7.2.tar.gz
(9.7 kB
view details)
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 dodo_is_api-0.7.2.tar.gz.
File metadata
- Download URL: dodo_is_api-0.7.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.7 Darwin/22.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04798bc72752b690bb6d3a649f1b5f99c9bd840cd99469dc8c940920f61bd98b
|
|
| MD5 |
badc7d7cd23499f1b167e662d6cf1df5
|
|
| BLAKE2b-256 |
4b30489065e184a87317aa66c611f49d4ad8aee65dc2344dccd9dee841ceccc0
|
File details
Details for the file dodo_is_api-0.7.2-py3-none-any.whl.
File metadata
- Download URL: dodo_is_api-0.7.2-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.7 Darwin/22.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85f453b0b52b21317062b20e3487c440adee6d8220d7dfceb02bc30a73e7f315
|
|
| MD5 |
2bb764c2295549c056b4df5e5532a074
|
|
| BLAKE2b-256 |
d7d4dd0ec5e7668ddd051aa4cb4d7024ea2d25cff3dee5acbd56e094c0a769c4
|