https://github.com/nsarathy/coffy
Open source lightweight embedded database engine for Python that supports NoSQL, SQL, and Graph data models.
https://github.com/nsarathy/coffy
database databases dbms embedded-database good-first-issue graph graphdb local-first networkx networkx-graph nosql python rdbms sql sqlite toy-dbms
Last synced: 3 months ago
JSON representation
Open source lightweight embedded database engine for Python that supports NoSQL, SQL, and Graph data models.
- Host: GitHub
- URL: https://github.com/nsarathy/coffy
- Owner: nsarathy
- License: mit
- Created: 2025-07-05T05:48:39.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-13T21:03:55.000Z (5 months ago)
- Last Synced: 2025-08-13T22:26:49.900Z (5 months ago)
- Topics: database, databases, dbms, embedded-database, good-first-issue, graph, graphdb, local-first, networkx, networkx-graph, nosql, python, rdbms, sql, sqlite, toy-dbms
- Language: Python
- Homepage: https://coffydb.org/
- Size: 2.88 MB
- Stars: 31
- Watchers: 2
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Coffy: Local-First Embedded Database Engine for Python
[](https://pypi.org/project/coffy/)

**Coffy** is a lightweight, local-first embedded database engine supporting **NoSQL**, **SQL**, and **Graph** models — all in pure Python. Designed for fast prototyping, scripting, and local apps.
[coffydb.org](https://coffydb.org/)
---
## Installation
```bash
pip install coffy
```
---

---
## Features
- Local persistence (JSON, SQLite)
- In-memory mode (`:memory:` or `None`)
- No server needed
- Logical and comparison operators
- Unified query interface
- Command Line Interface (CLI)
---
## Engines
If you are viewing this from `coffydb.org`, you can find the documentation for each engine in the `NoSQL`, `Graph`, and `SQL` sections.
| Engine | Description | Docs |
|--------|-------------|------|
| `coffy.graph` | Local graph database (NetworkX-based) | [Graph Docs](https://github.com/nsarathy/Coffy/blob/main/Documentation/GRAPH_DOCS.md) |
| `coffy.nosql` | Document store with chainable queries | [NoSQL Docs](https://github.com/nsarathy/Coffy/blob/main/Documentation/NOSQL_DOCS.md) |
| `coffy.sql` | Thin SQLite wrapper | [SQL Docs](https://github.com/nsarathy/Coffy/blob/main/Documentation/SQL_DOCS.md) |
---
## What sets Coffy apart?
Only embedded Python graph DB with:
- ✅ Declarative traversal syntax (match_node_path(...))
- ✅ Label/type filtering, limit/offset, result projection
- ✅ Unified API for both nodes and relationships
- ✅ Robust CLI
Only pure-Python embedded document store with:
- ✅ Auto-indexing on all top-level fields
- ✅ Chainable logical queries (.where(...).eq(...).or_().in_())
- ✅ Merge/lookups across collections (like mini $lookup)
- ✅ JSON persistence or in-memory fallback
---
## 🔗 Links
- [coffydb.org](https://coffydb.org/)
- PyPI: [coffy](https://pypi.org/project/coffy/)
- Source: [GitHub](https://github.com/nsarathy/Coffy)
---
## License
MIT License © 2025 [Neelesh Sarathy](https://github.com/nsarathy)
---
Disclaimer: Number of downloads includes mirrors.