potluckdb
Read and write a local SQLite database. Synchronize it through your own storage service.
Choose your language
Section titled “Choose your language”Each install page ends with a link to the quickstart for that language.
Each device has one writable database. You can synchronize in both directions automatically or with an explicit API call. sync() reports a conflict as a returned value, not as an exception. Every SDK provides the same behavior. Concepts explains databases, remotes, and conflicts.
import potluckdb
remote = potluckdb.Remote.from_directory("shared-remote")db = potluckdb.open("app.potluckdb", remote)db.execute("CREATE TABLE IF NOT EXISTS note(id INTEGER PRIMARY KEY, body TEXT)")db.execute("INSERT INTO note(body) VALUES(?)", ("hello",))db.close()remote.close()These paths persist between runs, as they do in an application. On the second run, the program opens the database that the first run created. It creates the table only if the table does not exist. The runnable examples use temporary directories and remove them after each run. They start with an empty database, so they create their tables directly.
The reference has ten language versions. Compatibility maps fourteen languages to those versions. Each page links to its versions in the other languages.
| Page | What it tells you |
|---|---|
| Install | Requirements and installation steps for your language. |
| Quickstart | A complete program that synchronizes two devices and resolves a conflict. |
| Concepts | The database model, in the order that a program uses it. |
| Open and construct | Every call for opening a database or creating a remote. |
| Examples | Longer programs that you can run. |
| Platforms | Requirements and examples for each operating system, including the browser. |
| Frameworks | Integration with each application framework. |
| Standard interfaces | DB-API, JDBC, and ODBC access through one connection string. |
| Features | Every capability and what it means for your application. |
| Compatibility | Supported platforms, languages, analytical engines, and remotes. |
| Performance | One measured run for each remote type. |
| Analytics engine | The DuckDB library that each platform loads for analytical reads. |
| Errors | Every error code, its category, and the action to take. |
| Before production | Settings to choose before you release your application. |
| Licensing and trial | How the trial and license keys work. |
The documentation generator reads the code’s public API on every change. The tests run every example against the package that you install. These checks keep the reference and examples current.