---
title: Python Compatibility Requirements
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > App and API Protection > Enabling App and API
  Protection > Compatibility Requirements > Python Compatibility Requirements
---

# Python Compatibility Requirements

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site). ().
{% /alert %}

{% /callout %}

## App and API Protection capabilities support{% #app-and-api-protection-capabilities-support %}

The following App and API Protection capabilities are supported in the Python library, for the specified tracer version:

| App and API Protection capability                                                                                                                                                      | Minimum Python tracer version |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| Threat Detection                                                                                                                                                                       | `1.9.0`                       |
| Threat Protection                                                                                                                                                                      | `1.10.0`                      |
| Customize response to blocked requests                                                                                                                                                 | `1.19.0`                      |
| [Automatic user activity event tracking](https://docs.datadoghq.com/security/application_security/how-it-works/add-user-info/?tab=python#automatic-user-activity-event-tracking-modes) | `1.17.0`                      |
| [API Security Inventory](https://docs.datadoghq.com/security/application_security/api-inventory/)                                                                                      | `2.6.0`                       |

**Note**: Threat Protection requires enabling [Remote Configuration](https://docs.datadoghq.com/tracing/guide/remote_config), which is included in the listed minimum tracer version.

### Supported deployment types{% #supported-deployment-types %}

| Type        | Threat Detection support |
| ----------- | ------------------------ |
| Docker      | yes                      |
| Kubernetes  | yes                      |
| Amazon ECS  | yes                      |
| AWS Fargate | yes                      |
| AWS Lambda  | yes                      |

## Language and framework compatibility{% #language-and-framework-compatibility %}

### Supported Python versions{% #supported-python-versions %}

The Python App and API Protection Client library follows a [versioning policy](https://ddtrace.readthedocs.io/en/stable/versioning.html) that specifies the support level for the different versions of the library and Python runtime.

Two release branches are supported:

| Release    | Support level                    | Minimum Datadog Agent |
| ---------- | -------------------------------- | --------------------- |
| `>=4.0,<5` | General Availability             | 7.28                  |
| `>=3.0,<4` | Maintenence (until May 31, 2026) | 7.28                  |
| `>=2.0,<3` | End of Life                      | 7.28                  |
| `<2`       | End of Life                      |

And the library supports the following runtimes:

| OS      | CPU                   | Runtime | Runtime version | Supported ddtrace versions |
| ------- | --------------------- | ------- | --------------- | -------------------------- |
| Linux   | x86-64, AArch64       | CPython | 3.9+            | `>=4, <5`                  |
| MacOS   | Intel, Apple Silicon  | CPython | 3.9+            | `>=4, <5`                  |
| Windows | 64bit, 32bit          | CPython | 3.9+            | `>=4, <5`                  |
| Linux   | x86-64, i686, AArch64 | CPython | 3.8+            | `>=3, <4`                  |
| MacOS   | Intel, Apple Silicon  | CPython | 3.8+            | `>=3, <4`                  |
| Windows | 64bit, 32bit          | CPython | 3.8+            | `>=3, <4`                  |
| Linux   | x86-64, i686, AArch64 | CPython | 3.7-3.13        | `>=2,<3`                   |
| MacOS   | Intel, Apple Silicon  | CPython | 3.7-3.13        | `>=2,<3`                   |
| Windows | 64bit, 32bit          | CPython | 3.7-3.13        | `>=2,<3`                   |
| Linux   | x86-64, i686, AArch64 | CPython | 2.7, 3.5-3.11   | `<2`                       |
| MacOS   | Intel, Apple Silicon  | CPython | 2.7, 3.5-3.11   | `<2`                       |
| Windows | 64bit, 32bit          | CPython | 2.7, 3.5-3.11   | `<2`                       |

### Web framework compatibility{% #web-framework-compatibility %}

- Attacker source HTTP request details
- Tags for the HTTP request (status code, method, etc)
- Distributed Tracing to see attack flows through your applications

### Supported frameworks{% #supported-frameworks %}

**Note:** Tornado support is available starting in ddtrace Python version 4.4.

| Framework | Versions | Threat Detection supported? | Threat Protection supported? |
| --------- | -------- | --------------------------- | ---------------------------- |
| Django    | 2.2      | yes                         | yes                          |
| FastAPI   | 0.86     | yes                         | yes                          |
| Flask     | 1.1      | yes                         | yes                          |
| Tornado   | 6.3      | yes                         | yes                          |

{% alert level="info" %}
If you don't see your framework of choice listed, let us know! Fill out [this short form to send details](https://forms.gle/gHrxGQMEnAobukfn7).
{% /alert %}

### Data store compatibility{% #data-store-compatibility %}

**Datastore tracing provides:**

- timing request to response
- query info (for example, a sanitized query string)
- error and stacktrace capturing

##### App and API Protection Capability Notes{% #app-and-api-protection-capability-notes %}

- **Threat Protection** also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below.
- 

The Python library supports the [database API specifications](https://peps.python.org/pep-0249/) and supports all generic SQL databases. This includes databases such as SQLite, Mysql, Postgres and MariaDB.

### User Authentication Frameworks compatibility{% #user-authentication-frameworks-compatibility %}

**Integrations to User Authentication Frameworks provide:**

- User login events, including the user IDs
- Account Takeover detection monitoring for user login events

| Framework | Framework Versions     |
| --------- | ---------------------- |
| Django    | 1.11, 2.2, 3.2, >= 4.0 |
