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.10.tar.gz (188.2 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.10-py3-none-any.whl (223.3 kB view details)

Uploaded Python 3

File details

Details for the file tusk_drift_python_sdk-0.1.10.tar.gz.

File metadata

  • Download URL: tusk_drift_python_sdk-0.1.10.tar.gz
  • Upload date:
  • Size: 188.2 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.10.tar.gz
Algorithm Hash digest
SHA256 8e701ce1c0275a9e5b2383357a7ea5a58591096741f28f6a176f251e6dd9d356
MD5 e34e6e7f0e656fd60d24e12b087be5e0
BLAKE2b-256 10ad1277b7b3a6e12cf5b6cecc0025bdafca65315cee3505da77b3791a79cd51

See more details on using hashes here.

Provenance

The following attestation bundles were made for tusk_drift_python_sdk-0.1.10.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.10-py3-none-any.whl.

File metadata

File hashes

Hashes for tusk_drift_python_sdk-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 39767efa347f1f5d52101766e8e2a30815aff45e7b6638548805dec64f79846d
MD5 81aedc28c044c2e10f68a8984fc3030a
BLAKE2b-256 7565edc8ca995e44177673a3044b6de1546dcc0d83ee5f1094c8eb420a2a78f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tusk_drift_python_sdk-0.1.10-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