- Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
- Copy
.env.sampleto.envand setFLEXPRICE_API_KEY. Optionally setFLEXPRICE_API_HOSTto a full URL (default:https://us.api.flexprice.io/v1). - Run the sync example:
python example.py
Run the async example:python async_event_example.py
(From the package root:python examples/example.pyorpython examples/async_event_example.py.)
Integration tests: Full API flows are in api/tests/python/test_sdk.py. Install with pip install -r requirements.txt in api/tests/python; see api/tests/README.md.