claude-to-sqlite
Convert a Claude.ai export to SQLite
Installation
Install this tool using pip:
pip install claude-to-sqlite
Usage
Start by exporting your Claude data. You will be emailed a link to a zip file (though it may be missing the .zip extension).
Run the command like this:
claude-to-sqlite claude-export.zip claude.db
Now claude.db will be a SQLite containing the conversations and messages from your Claude export.
You can explore that using Datasette:
datasette claude.db
Database schema
Assuming the Claude export JSON has not changed since this tool was last released on 20th October 2024 the database tables should look like this:
CREATE TABLE [conversations] (
[uuid] TEXT PRIMARY KEY,
[name] TEXT,
[created_at] TEXT,
[updated_at] TEXT,
[account_id] TEXT
);
CREATE TABLE [messages] (
[uuid] TEXT PRIMARY KEY,
[text] TEXT,
[sender] TEXT,
[created_at] TEXT,
[updated_at] TEXT,
[attachments] TEXT,
[files] TEXT,
[conversation_id] TEXT REFERENCES [conversations]([uuid])
);
CREATE TABLE [artifacts] (
[id] TEXT PRIMARY KEY,
[artifact] TEXT,
[identifier] TEXT,
[version] INTEGER,
[type] TEXT,
[language] TEXT,
[title] TEXT,
[content] TEXT,
[thinking] TEXT,
[conversation_id] TEXT REFERENCES [conversations]([uuid]),
[message_id] TEXT REFERENCES [messages]([uuid])
);
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd claude-to-sqlite
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest
Metadata
Release files for claude-to-sqlite 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| claude_to_sqlite-0.2.tar.gz | 9.4 kB | Without provenance | Details for claude_to_sqlite-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| claude_to_sqlite-0.2-py3-none-any.whl | Python 3 | none | any | Details for claude_to_sqlite-0.2-py3-none-any.whl |
Total release size: 18.4 kB
Release files / claude_to_sqlite-0.2.tar.gz
| Download URL | claude_to_sqlite-0.2.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98927612aea38c40d93368d2cd54b32e11b24fe93eb8550c9e6ec031d1134c5e
|
|
BLAKE2b-256 checksum How to use checksums |
aae153799e8f3240ff08d6aa8cf1c86f4322148dc6dc0bc3b7776f8c82695291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / claude_to_sqlite-0.2-py3-none-any.whl
| Download URL | claude_to_sqlite-0.2-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75440f745f47bfec96b84f23413a701a69c87ac35de205bfc8680b1869abde96
|
|
BLAKE2b-256 checksum How to use checksums |
aa6578270e19a9454730b27373b1a19f5e86524d3a9e4b3ed06cdb5ca17264b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for claude-to-sqlite 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.