https://github.com/dashxhq/dashx-python
DashX SDK for Python
https://github.com/dashxhq/dashx-python
ab-testing admin-panel analytics automation billing cms feature-flags messaging notifications python
Last synced: about 1 month ago
JSON representation
DashX SDK for Python
- Host: GitHub
- URL: https://github.com/dashxhq/dashx-python
- Owner: dashxhq
- License: mit
- Created: 2022-05-16T10:32:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-15T19:36:12.000Z (5 months ago)
- Last Synced: 2026-02-16T00:43:22.403Z (5 months ago)
- Topics: ab-testing, admin-panel, analytics, automation, billing, cms, feature-flags, messaging, notifications, python
- Language: Python
- Homepage: https://docs.dashx.com
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dashx-python
_DashX SDK for Python_
## Install
```sh
pip install --upgrade dashx
```
## Usage
For detailed usage, refer to the [documentation](https://docs.dashx.com).
## Testing
Install the package in editable mode with dev dependencies, then run pytest from the project root:
```bash
pip install -e ".[dev]"
pytest
```
Tests use **mocked** requests (no real API calls) and set their own env vars via fixtures, so you do **not** need to set `DASHX_PUBLIC_KEY` or `DASHX_PRIVATE_KEY` to run tests.
- Run with verbose output: `pytest -v`
- Run a specific file: `pytest tests/test_client.py`
- Run a specific test: `pytest tests/test_client.py::TestIdentify::test_identify_with_uid_calls_make_request`
## Examples
The `examples/` folder contains scripts that call the **real** DashX API. They require valid credentials via environment variables.
**Required env vars:** `DASHX_PUBLIC_KEY`, `DASHX_PRIVATE_KEY`, `DASHX_TARGET_ENVIRONMENT`
**Optional:** `DASHX_BASE_URI` (default: `https://api.dashx.com/graphql`)
From the project root:
```bash
export DASHX_PUBLIC_KEY=your_public_key
export DASHX_PRIVATE_KEY=your_private_key
export DASHX_TARGET_ENVIRONMENT=development
python -m examples.identify_example
python -m examples.track_example
```
Or with `PYTHONPATH` if the package isn’t installed: `PYTHONPATH=src python -m examples.identify_example`
See **examples/README.md** for more detail (e.g. using a `.env` file).