---
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, us2.ddog-gov.com

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

{% /callout %}

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

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 |
| ------------------------------------------- | ----------------------------- |
| HTTP Monitoring                             | 1.16.0                        |
| gRPC Monitoring                             | not supported                 |
| GraphQL Monitoring                          | not supported                 |
| Exploit Prevention                          | 2.20.0                        |
| API Security                                | 4.6.0                         |
| Account Takeover Protection                 | 2.11.0                        |
| Runtime Activation                          | 1.6.0                         |
| Runtime Software Composition Analysis (SCA) | 1.5.0                         |
| Runtime Code Analysis (IAST)                | 3.15.0                        |

The minimum tracer version to get all supported App and API Protection capabilities for Python is 4.6.0. The following capabilities are not yet supported: gRPC Monitoring, GraphQL Monitoring. **Note**: AAP requires enabling [Remote Configuration](https://docs.datadoghq.com/tracing/guide/remote_config.md), which is included in the listed minimum tracer version.

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

| Deployment type | 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 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`                       |

## Integrations{% #integrations %}

The Python tracer includes support for the following frameworks, data stores and libraries.

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

### 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

{% alert level="info" %}
Tornado integration requires setting the `DD_TRACE_TORNADO_ENABLED` environment variable to `true`.
{% /alert %}

| Framework                                        | HTTP Monitoring | HTTP Blocking |
| ------------------------------------------------ | --------------- | ------------- |
| [Django](https://github.com/django/django)       | yes             | yes           |
| [Flask](https://github.com/pallets/flask)        | yes             | yes           |
| [FastAPI](https://github.com/fastapi/fastapi)    | yes             | yes           |
| [Tornado](https://github.com/tornadoweb/tornado) | yes             | yes           |

### 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                                  | Automatic User Event Tracking |
| ------------------------------------------ | ----------------------------- |
| [Django](https://github.com/django/django) | yes                           |

### Networking framework compatibility{% #networking-framework-compatibility %}

| Framework                                     | Server-side Request Forgery (SSRF) |
| --------------------------------------------- | ---------------------------------- |
| [Requests](https://github.com/psf/requests)   | yes                                |
| [urllib3](https://github.com/urllib3/urllib3) | yes                                |
| [httpx](https://github.com/encode/httpx)      | yes                                |
| urllib                                        | yes                                |
| http.client                                   | yes                                |
| webbrowser                                    |

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

**Datastore tracing provides:**

- SQL attack detection
- Query info (for example, a sanitized query string)
- Error and stacktrace capturing

**Note**: App and API Protection also analyzes untrusted HTTP request input, so some protections can still apply even when a database integration is not listed here.

| Framework                                                                        | SQL Injection (SQLi) |
| -------------------------------------------------------------------------------- | -------------------- |
| [psycopg](https://github.com/psycopg/psycopg)                                    | yes                  |
| [mysql-connector-python](https://github.com/mysql/mysql-connector-python)        | yes                  |
| [mysqlclient](https://github.com/PyMySQL/mysqlclient)                            | yes                  |
| [PyMySQL](https://github.com/PyMySQL/PyMySQL)                                    | yes                  |
| sqlite3                                                                          | yes                  |
| [MariaDB](https://github.com/mariadb-corporation/mariadb-connector-python)       | yes                  |
| [pyodbc](https://github.com/mkleehammer/pyodbc)                                  | yes                  |
| [Snowflake Connector](https://github.com/snowflakedb/snowflake-connector-python) | yes                  |

### Filesystem compatibility{% #filesystem-compatibility %}

| Framework | Local File Inclusion (LFI) |
| --------- | -------------------------- |
| pathlib   | yes                        |
| builtins  | yes                        |

### Subprocess compatibility{% #subprocess-compatibility %}

| Framework  | Command Injection | Shell Injection |
| ---------- | ----------------- | --------------- |
| subprocess | yes               |
| os         | yes               | yes             |
