Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.
Python aiburrchatbot-frameworkdagsgenerative-aigraphshacktoberfestllmopsllmsmlopspersistent-data-structurestate-machinestate-managementvisibility
Update persister docs to reflect db dependencies
jernejfranke4442739ea1f
diff --git a/docs/reference/persister.rst b/docs/reference/persister.rstindex 76d2bf14..8b610730 100644--- a/docs/reference/persister.rst+++ b/docs/reference/persister.rst@@ -5,8 +5,29 @@ State PersistenceBurr provides a set of tools to make loading and saving state easy. These are functionsthat will be used by lifecycle hooks to save and load state.+We currently support the following database integrations:++.. table:: Burr Implemented Persisters+ :widths: auto++ +-------------+-----------------------------------------------------------------+---------------------------------------------------------------------++ | Database | Sync | Async |+ +=============+===========+=====================================================+===============+=====================================================++ | SQLite | sqlite3 | :ref:`SQLitePersister <syncsqliteref>` | aiosqlite | :ref:`AsyncSQLitePersister <asyncsqliteref>` |+ +-------------+-----------+-----------------------------------------------------+---------------+-----------------------------------------------------++ | PostgreSQL | psycopg2 | :ref:`PostgreSQLPersister <syncpostgresref>` | asyncpg | :ref:`AsyncPostgreSQLPersister <asyncpostgresref>` |+ +-------------+-----------+-----------------------------------------------------+---------------+-----------------------------------------------------++ | Redis | redis | :ref:`RedisBasePersister <syncredisref>` | redis.asyncio | :ref:`AsyncRedisBasePersister <asyncredisref>` |+ +-------------+-----------+-----------------------------------------------------+---------------+-----------------------------------------------------++ | MongoDB | pymongo | :ref:`MongoDBBasePersister <syncmongoref>` | ❌ | ❌ |+ +-------------+-----------+-----------------------------------------------------+---------------+-----------------------------------------------------+++We follow the naming convention ``b_dependency-library``, where the ``b_`` is used to avoid name+clashing with the underlying library. We chose the library name in case we implement the same database+persister with different dependency libraries to keep the class naming convention.+If you want to implement your own state persister (to bridge it with a database), you should implement-the ``BaseStatePersister`` interface.+the ``BaseStatePersister`` or the ``AsyncBaseStatePersister`` interface... autoclass:: burr.core.persistence.BaseStatePersister:members:@@ -61,23 +82,30 @@ Supported Sync ImplementationsCurrently we support the following, although we highly recommend you contribute your own! We will be adding more shortly.+.. _syncsqliteref:+.. autoclass:: burr.core.persistence.SQLitePersister:members:.. automethod:: __init__+.. _syncpostgresref:-.. autoclass:: burr.integrations.persisters.postgresql.PostgreSQLPersister+.. autoclass:: burr.integrations.persisters.b_psycopg2.PostgreSQLPersister:members:.. automethod:: __init__+.. _syncredisref:+.. autoclass:: burr.integrations.persisters.b_redis.RedisBasePersister:members:.. automethod:: __init__-.. autoclass:: burr.integrations.persisters.b_mongodb.MongoDBBasePersister+.. _syncmongoref:++.. autoclass:: burr.integrations.persisters.b_pymongo.MongoDBBasePersister:members:.. automethod:: __init__@@ -90,20 +118,26 @@ although it uses different mechanisms to save state (as it tracks more than justSupported Async Implementations================================+.. _asyncpersistersref:+Currently we support the following, although we highly recommend you contribute your own! We will be adding more shortly.-.. _asyncpersistersref:+.. _asyncsqliteref:.. autoclass:: burr.integrations.persisters.b_aiosqlite.AsyncSQLitePersister:members:.. automethod:: __init__-.. autoclass:: burr.integrations.persisters.postgresql.AsyncPostgreSQLPersister+.. _asyncpostgresref:++.. autoclass:: burr.integrations.persisters.b_asyncpg.AsyncPostgreSQLPersister:members:.. automethod:: __init__+.. _asyncredisref:+.. autoclass:: burr.integrations.persisters.b_redis.AsyncRedisBasePersister:members: