Python SDK for Tusk Drift instrumentation and replay
Project description
The Python Tusk Drift SDK enables fast and deterministic API testing by capturing and replaying API calls made to/from your service. Automatically record real-world API calls, then replay them as tests using the Tusk CLI to find regressions. During replay, all outbound requests are intercepted with recorded data to ensure consistent behavior without side-effects.
Documentation
For comprehensive guides and API reference, visit our full documentation.
SDK Guides
- Initialization Guide - Set up the SDK in your Python application
- Environment Variables - Environment variables reference
- Quick Start Guide - Record and replay your first trace
Requirements
- Python 3.12+
Tusk Drift currently supports the following packages and versions:
- Flask:
flask>=2.0.0 - FastAPI:
fastapi>=0.68.0 - Django:
django>=3.2.0 - Requests:
requests(all versions) - HTTPX:
httpx(all versions) - psycopg:
psycopg>=3.0.0,psycopg2>=2.8.0 - Redis:
redis(all versions)
If you're using packages or versions not listed above, please create an issue with the package + version you'd like an instrumentation for.
Installation
Step 1: Install the CLI
First, install and configure the Tusk Drift CLI by following our CLI installation guide. The CLI helps set up your Tusk configuration file and replays tests.
The wizard will eventually direct you back here when it's time to set up the SDK.
Step 2: Install the SDK
After completing the CLI wizard, install the SDK:
pip install tusk-drift-python-sdk
Step 3: Initialize the SDK for your service
Refer to our initialization guide to set up the SDK for your service.
Step 4: Run Your First Test
Follow along our quick start guide to record and replay your first test!
Troubleshooting
Having issues?
- Check our initialization guide for common setup issues
- Create an issue or reach us at support@usetusk.ai.
Community
Join our open source community on Slack.
Contributing
We appreciate feedback and contributions. See CONTRIBUTING.md.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tusk_drift_python_sdk-0.1.9.tar.gz.
File metadata
- Download URL: tusk_drift_python_sdk-0.1.9.tar.gz
- Upload date:
- Size: 186.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0abad230d6bf090b7eafce6e307c9512419d4ccb9ce81010e6d92c44e2a06e6d
|
|
| MD5 |
3805129bb0bbf309fd945311ca6fe520
|
|
| BLAKE2b-256 |
c24b66800a494784a80287da8882d4dc665e092e0236841a46141057ad7c3fef
|
Provenance
The following attestation bundles were made for tusk_drift_python_sdk-0.1.9.tar.gz:
Publisher:
publish-python-sdk.yml on Use-Tusk/drift-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tusk_drift_python_sdk-0.1.9.tar.gz -
Subject digest:
0abad230d6bf090b7eafce6e307c9512419d4ccb9ce81010e6d92c44e2a06e6d - Sigstore transparency entry: 825843010
- Sigstore integration time:
-
Permalink:
Use-Tusk/drift-python-sdk@ae49e9c6c40eeeb33d049dd8ef9d3e00edac11da -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/Use-Tusk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@ae49e9c6c40eeeb33d049dd8ef9d3e00edac11da -
Trigger Event:
release
-
Statement type:
File details
Details for the file tusk_drift_python_sdk-0.1.9-py3-none-any.whl.
File metadata
- Download URL: tusk_drift_python_sdk-0.1.9-py3-none-any.whl
- Upload date:
- Size: 221.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10224dc3894b70c1c978046bc0c7bd1d22e5bd75930c84dca3d1c1e57fddcfa1
|
|
| MD5 |
11366d75c74369dbddee6321398ee15c
|
|
| BLAKE2b-256 |
d245dbf4ab4e11713727fee6625b8e0a4b727604a35fb89a34c8930f2a9d04f6
|
Provenance
The following attestation bundles were made for tusk_drift_python_sdk-0.1.9-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on Use-Tusk/drift-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tusk_drift_python_sdk-0.1.9-py3-none-any.whl -
Subject digest:
10224dc3894b70c1c978046bc0c7bd1d22e5bd75930c84dca3d1c1e57fddcfa1 - Sigstore transparency entry: 825843077
- Sigstore integration time:
-
Permalink:
Use-Tusk/drift-python-sdk@ae49e9c6c40eeeb33d049dd8ef9d3e00edac11da -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/Use-Tusk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@ae49e9c6c40eeeb33d049dd8ef9d3e00edac11da -
Trigger Event:
release
-
Statement type: