Async CustomerIO Client - a Python client to interact with CustomerIO in an async fashion.
Project description
async-customerio is a lightweight asynchronous client to interact with CustomerIO
- Free software: MIT license
- Requires: Python 3.7+
Features
- Fully async
- Interface preserved as Official Python Client
customerio
has - Send push notification
- Send messages
Installation
$ pip install async-customerio
Getting started
import asyncio
from async_customerio import AsyncCustomerIO, Regions
async def main():
site_id = "Some-id-gotten-from-CustomerIO"
api_key = "Some-key-gotten-from-CustomerIO"
cio = AsyncCustomerIO(site_id, api_key, region=Regions.US)
await cio.identify(id=5, email="customer@example.com", first_name="John", last_name="Doh", subscription_plan="premium")
await cio.track(customer_id=5, name="product.purchased", product_sku="XYZ-12345", price=23.45)
if __name__ == "__main__":
asyncio.run(main())
Instantiating AsyncCustomerIO
object
Create an instance of the client with your Customer.io credentials.
from async_customerio import AsyncCustomerIO, Regions
cio = AsyncCustomerIO(site_id, api_key, region=Regions.US)
region
is optional and takes one of two values — Regions.US
or Regions.EU
. If you do not specify your region, we assume
that your account is based in the US (Regions.US
). If your account is based in the EU and you do not provide the correct region
(Regions.EU
), we'll route requests to our EU data centers accordingly, however this may cause data to be logged in the US.
License
async-customerio
is offered under the MIT license.
Source code
The latest developer version is available in a GitHub repository: https://github.com/healthjoy/async-customerio
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
Hashes for async_customerio-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 372449392fb2b8ca69793b43f9d5eea3a8912b6240cf7e1523133f4c76f4c2b7 |
|
MD5 | c288ebcc5d9864a9ff8606386c9e949c |
|
BLAKE2b-256 | cacd9289289d41fcd0ea6b21366fb748dbf895f76f242d6232f1cb094f6b2495 |