- use the official Chainlit data layer (PostgreSQL + asyncpg)
- leverage a community-based data layer
- or build your own!
Official data layer
The official Chainlit data layer
Community SQLAlchemy data layer
The community SQLAlchemy data layer
Community DynamoDB data layer
The community DynamoDB data layer
Custom data layer API
The custom data layer implementation reference
Official data layer
When using the official data layer, just add theDATABASE_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 withSQLAlchemyDataLayer
:
Custom data layers
Follow the reference 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
- LocalStack via
- Azure
- Blob Storage
- Data Lake Storage (ADLS) Gen2
- Google Cloud Storage
- via Private Key
- via Application Default Credentials (e.g. in Google Cloud Run)