Iterable API wrapper
Project description
Iterable API
This is a mostly complete wrapper of the Iterable API built with Python.
The interface is still in a state of flux, some methods will be renamed but the signatures should stay the same.
User Docs
This is a pure python development kit for interacting with the Iterable API. If you find anything to be out of date or are looking for support, you can file an issue on Github.
Installation
You can download and install the package from the Python Package Index with:
pip install iterable-api
Quickstart
from iterable import Iterable
api = Iterable('YOUR_API_KEY')
api.events.track(event_name='hello_iterable', user_id=42, created_at=datetime.now().to_timestamp())
If you're familiar with environment variables, you can set ITERABLE_API_KEY
. In that case you can set up the api client like so:
from os import getenv
from iterable import Iterable
api = Iterable(getenv('ITERABLE_API_KEY'))
Data exports
If you're interested in getting data out of your Iterable account, you can use the export_data_api
method on the API client.
Dropping down
The API client is a requests.Session under the hood with HTTP method names as top level functions in the wrapper.
If you want to drop down to the client, you only need to provide the resource path, e.g.:
api.get('/events/track')
This might be useful for exploring the API or debugging an issue.
Development Docs
If you're interested in extending this library, please follow these guidelines:
- Please file an issue first describing what you want to add or change.
- Fork the repository and submit a pull request.
Installation for development
This project uses poetry for now, so follow your preferred procedure for that.
poetry install
Testing
The library uses pytest - you can run the tests by invoking the following:
poetry run pytest
Project details
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
File details
Details for the file iterable-api-0.2.0.tar.gz
.
File metadata
- Download URL: iterable-api-0.2.0.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.4 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dca9ba2c9511fac9191af60a936a77107d617a32184f91ac690fd028fbd4c9e |
|
MD5 | 4c9bc75c1dcb9cb9c88dcff0506e8333 |
|
BLAKE2b-256 | 060f256808904b62f4725beebb24a23552783a60f529bff8fd55f77c7f73e5b4 |
File details
Details for the file iterable_api-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: iterable_api-0.2.0-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.4 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83f201fbb1ca405055f452b7d2f1ab242df103c7ec1c5e666fd83c520a86993b |
|
MD5 | b57dce3c5cb8ec1c379f7285924e894e |
|
BLAKE2b-256 | 93826a9a5eaad05247a3353d9f1f543f6208265f904168dc6b130e03d2bc5229 |