Skip to main content

Python SDK for Tusk Drift instrumentation and replay

Project description

Tusk Drift Banner

PyPI version License: Apache 2.0 GitHub last commit Tusk X account Tusk Community Slack

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

Tusk Drift Animated Diagram Tusk Drift Animated Diagram

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?

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tusk_drift_python_sdk-0.1.9.tar.gz (186.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tusk_drift_python_sdk-0.1.9-py3-none-any.whl (221.2 kB view details)

Uploaded Python 3

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

Hashes for tusk_drift_python_sdk-0.1.9.tar.gz
Algorithm Hash digest
SHA256 0abad230d6bf090b7eafce6e307c9512419d4ccb9ce81010e6d92c44e2a06e6d
MD5 3805129bb0bbf309fd945311ca6fe520
BLAKE2b-256 c24b66800a494784a80287da8882d4dc665e092e0236841a46141057ad7c3fef

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tusk_drift_python_sdk-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for tusk_drift_python_sdk-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 10224dc3894b70c1c978046bc0c7bd1d22e5bd75930c84dca3d1c1e57fddcfa1
MD5 11366d75c74369dbddee6321398ee15c
BLAKE2b-256 d245dbf4ab4e11713727fee6625b8e0a4b727604a35fb89a34c8930f2a9d04f6

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page