Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
akalex committed Dec 9, 2022
1 parent f444cfb commit 04428bf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.2.0

* `README.md` has been updated with examples of how to use.

## 0.1.0

* First release on PyPI.
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,50 @@

## Features

*
* Fully async
* Interface preserved as Official Python Client `customerio` has
* Send push notification
* Send messages

## Installation
```shell script
$ pip install async-customerio
```

## Getting started
TBD...
```python
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="[email protected]", 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](https://fly.customer.io/settings/api_credentials).

```python

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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "async-customerio"
version = "0.1.0"
version = "0.2.0"
description = "Async CustomerIO Client - a Python client to interact with CustomerIO in an async fashion."
license = "MIT"
authors = [
Expand Down

0 comments on commit 04428bf

Please sign in to comment.