> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

Choose one of the following options for your open source data layer:

* use the official Chainlit data layer (PostgreSQL + asyncpg)
* leverage a community-based data layer
* or build your own!

<CardGroup cols={2}>
  <Card title="Official data layer" icon="check" color="#16a34a" href="/data-layers/official">
    The official Chainlit data layer
  </Card>

  <Card title="Community SQLAlchemy data layer" icon="database" color="#0285c7" href="/data-layers/sqlalchemy">
    The community SQLAlchemy data layer
  </Card>

  <Card title="Community DynamoDB data layer" icon="database" color="#3afadc" href="/data-layers/dynamodb">
    The community DynamoDB data layer
  </Card>

  <Card title="Custom data layer API" icon="text" color="#ea5a0c" href="/api-reference/data-persistence/custom-data-layer">
    The custom data layer implementation reference
  </Card>
</CardGroup>

## Official data layer

When using the [official data layer](/data-layers/official), just add the `DATABASE_URL` variable to your `.env` and
a cloud storage configuration if relevant.

## Community data layers

For community data layers, you need to import the corresponding data layer in your chainlit app.
Here is how you would do it with `SQLAlchemyDataLayer`:

```python theme={null}
import chainlit as cl

from chainlit.data.sql_alchemy import SQLAlchemyDataLayer

@cl.data_layer
def get_data_layer():
    return SQLAlchemyDataLayer(conninfo="...")
```

## Custom data layers

Follow the [reference](/api-reference/data-persistence/custom-data-layer) for an exhaustive list of the methods your custom data layer needs to implement.

## Cloud Storage Providers supported out-of-the-box

* AWS S3
  * LocalStack via `DEV_AWS_ENDPOINT` environment variable
* Azure
  * Blob Storage
  * Data Lake Storage (ADLS) Gen2
* Google Cloud Storage
  * via Private Key
  * via Application Default Credentials (e.g. in Google Cloud Run)
