Promoted.ai Python Delivery Client
Project description
promoted-python-delivery-client
Python client SDK for the Promoted.ai Delivery API
Prereqs
- wheel
- setuptools
- twine
- bump2version
Development
- Start venv:
source venv/bin/activate
- Build wheel:
python setup.py bdist_wheel
- Install locally:
pip install dist/promoted_python_delivery_client-0.1.0-py3-none-any.whl --force-reinstall
- Try it out:
- See the
scripts/
directory. - Create a
.env
file with a few variables:DELIVERY_ENDPOINT=<GET ME FROM PROMOTED> DELIVERY_API_KEY=<GET ME FROM PROMOTED> METRICS_ENDPOINT=<GET ME FROM PROMOTED> METRICS_API_KEY=<GET ME FROM PROMOTED>
- Invoke (for example)
python3 scripts/call_delivery.sh
.
- See the
Testing
Unit tests
- Use pytest:
pytest tests/
Release
- Create a development branch
bump2version [major|minor|patch]
- Send a pull request and merge.
python3 -m twine upload dist/*
- PyPi
- FUTURE: Do this with a Github Action.
Dependencies
- dataclasses-json -- flexible JSON serialization and deserialization of Python dataclasses. One key feature we use is the ability to omit None's (nulls) from request JSON to decrease payload size.
- requests -- defacto standard HTTP library used to call Promoted APIs.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for promoted_python_delivery_client-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28cf6fe97d8819393d0e7946108c0847f2d7196a24323a0d9309b1742ee2dac0 |
|
MD5 | 04c3b09b890ecca6b6aa7fac15ac1824 |
|
BLAKE2b-256 | 1e5b15a0bd33fc3905117c5677e8eff7f9e09a9ea5b14ccd96dd7efa1a7085d9 |