# Python SDK

The Python SDK can be used for programmatically creating projects and uploading data to them.

{% hint style="info" %}
We recommend using the UI to create projects as part of a normal workflow. This will provide the best experience and most options for project setup. For more information see [Projects](https://github.com/dbnlAI/docs/blob/main/reference/workflow/projects.md).
{% endhint %}

See [SDK Log Ingestion](https://github.com/dbnlAI/docs/blob/main/reference/configuration/data-connections/sdk-log-ingestion.md) for more information and examples on using the SDK to upload log data to your deployment.

## Installation

To install the latest SDK, run:

```shell
pip install --upgrade dbnl
```

## SDK Functions

* [`convert_otlp_traces_data()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#convert_otlp_traces_data)
* [`create_llm_model()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#create_llm_model)
* [`create_metric()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#create_metric)
* [`create_project()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#create_project)
* [`delete_llm_model()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#delete_llm_model)
* [`delete_metric()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#delete_metric)
* [`flatten_otlp_traces_data()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#flatten_otlp_traces_data)
* [`get_llm_model()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#get_llm_model)
* [`get_llm_model_by_name()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#get_llm_model_by_name)
* [`get_or_create_llm_model()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#get_or_create_llm_model)
* [`get_or_create_project()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#get_or_create_project)
* [`get_project()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#get_project)
* [`get_project_by_name()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#get_project_by_name)
* [`log()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#log)
* [`login()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#login)
* [`update_llm_model()`](https://docs.dbnl.com/v0.29.x/reference/sdk-functions#update_llm_model)

## Classes

* [`LLMModel`](https://docs.dbnl.com/v0.29.x/reference/classes#LLMModel)
* [`Metric`](https://docs.dbnl.com/v0.29.x/reference/classes#Metric)
* [`Project`](https://docs.dbnl.com/v0.29.x/reference/classes#Project)
