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
customeriohas - 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
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 async_customerio-1.0.0.tar.gz.
File metadata
- Download URL: async_customerio-1.0.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-1034-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a69be8b5461a3afbc656b9fc2d86ddd25dc9b8a25125a77d12d63764219bad75
|
|
| MD5 |
ba16360871d6f7e89f6bf694466ae191
|
|
| BLAKE2b-256 |
86dbc21315b87a64b28655981a23aa3c7b45b7a3fa2f29a2156fb7ef774674d1
|
File details
Details for the file async_customerio-1.0.0-py3-none-any.whl.
File metadata
- Download URL: async_customerio-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.6 Linux/5.15.0-1034-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a48c87917716ca77e553a1e0f441e15e04e487a9b8da89c186ec3d3c6abf7aaf
|
|
| MD5 |
339f65fbcb8a9f07f8f5a5db65c8155a
|
|
| BLAKE2b-256 |
ecf47dc85cc1edaa867637b0fdf5cd581aba79312a6bde1c1cf1c5b5269138fb
|