Open Source Data Layers
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!
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 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
:
Custom data layers
Follow the reference for an exhaustive list of the methods your custom data layer needs to implement.
Was this page helpful?