---
title: Enable Autocomplete and Search for Python
description: >-
  Configure Python applications to enable IDE-like autocomplete and search
  features for Dynamic Instrumentation.
breadcrumbs: >-
  Docs > APM > Application Instrumentation > Dynamic Instrumentation >
  Autocomplete and Search > Enable Autocomplete and Search for Python
---

# Enable Autocomplete and Search for Python

{% 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 %}

{% callout %}
##### Join the Preview!

Autocomplete and search are in Preview.
{% /callout %}

## Requirements{% #requirements %}

- [Dynamic Instrumentation](https://docs.datadoghq.com/dynamic_instrumentation) is enabled for your service.
- Tracing library [`dd-trace-py`](https://github.com/DataDog/dd-trace-py) 2.9.0 or higher is installed.

## Installation{% #installation %}

Run your service with Dynamic Instrumentation enabled, and additionally enable autocomplete and search:

1. Run your service with Dynamic Instrumentation enabled by setting the `DD_DYNAMIC_INSTRUMENTATION_ENABLED` environment variable to `true`.
1. Specify `DD_SERVICE` and `DD_VERSION` [Unified Service Tags](https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging).
1. Invoke your service:

```shell
export DD_SERVICE=<YOUR_SERVICE>
export DD_ENV=<YOUR_ENV>
export DD_VERSION=<YOUR_VERSION>
export DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
export DD_SYMBOL_DATABASE_UPLOAD_ENABLED=true
ddtrace-run python -m myapp
```

After starting your service with the required features enabled, you can use Dynamic Instrumentation's IDE-like features on the [**APM** > **Dynamic Instrumentation**](https://app.datadoghq.com/dynamic-instrumentation) page.

## Additional configuration{% #additional-configuration %}

### Third party detection{% #third-party-detection %}

If autocomplete suggestions do not appear for your package or module, it may be incorrectly recognized as third-party code. The autocomplete and search features use a heuristic to filter out third-party code, which can sometimes lead to accidental misclassification.

To ensure that your code is properly recognized, and to enable accurate autocomplete and search functionality, configure your third-party detection settings to use the following options:

```gdscript3
export DD_THIRD_PARTY_DETECTION_EXCLUDES=<LIST_OF_USER_CODE_MODULES>
export DD_THIRD_PARTY_DETECTION_INCLUDES=<LIST_OF_ADDITIONAL_THIRD_PARTY_MODULES>
```

where `<LIST_OF_USER_CODE_MODULES>` and `<LIST_OF_ADDITIONAL_THIRD_PARTY_MODULES>` are comma separated lists of package prefixes. For example:

```gdscript3
export DD_THIRD_PARTY_DETECTION_EXCLUDES=shopping,database
```
