Metadata-Version: 2.4
Name: monadb
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Database
License-File: LICENSE
Summary: MonaDB — an embedded, dict-like SQL engine with a Python API.
Keywords: database,sql,embedded,document-store
Home-Page: https://github.com/rchowell/MonaDB
Author-email: "R. Conner Howell" <rchowell19@gmail.com>
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/rchowell/MonaDB#readme
Project-URL: Homepage, https://github.com/rchowell/MonaDB
Project-URL: Repository, https://github.com/rchowell/MonaDB

# MonaDB

An embedded document database with a small SQL dialect. Use it from Python, Rust, or the interactive `monadb` shell.

## Install

### Python (PyPI)

```sh
pip install monadb
```

```python
import monadb

con = monadb.connect()          # in-memory
con = monadb.connect("app.db")  # file-backed
con.execute("create table todos (id int);")
```

### CLI shell (`monadb`)

**Homebrew**

```sh
brew tap rchowell/tap
brew install monadb
monadb
```

**cargo**

```sh
cargo install monadb --features cli
monadb
```

**GitHub Releases** — download a prebuilt `monadb` binary for your platform from
[Releases](https://github.com/rchowell/MonaDB/releases).

### Rust (crates.io)

```sh
cargo add monadb
```

```rust
use monadb::MonaDB;

let mut db = MonaDB::open("app.db")?;
db.execute("create table t (id int);")?;
```

## `monadb` REPL

```sh
monadb              # in-memory database
monadb ./data.db    # open or create a file
```

Dot-commands inside the shell:

| Command  | Action                |
|----------|-----------------------|
| `.info`  | List catalog tables   |
| `.debug` | Toggle bytecode trace |
| `.exit`  | Quit                  |

SQL statements end with `;`. The prompt supports syntax highlighting and multiline input.

## Requirements

- **Python**: 3.9+
- **Rust** (from source): 1.85+ (edition 2024)
- **CLI**: terminal with readline support

## Documentation

- [Installation](https://github.com/rchowell/MonaDB/blob/main/site/content/installation.md)
- [Language reference](https://github.com/rchowell/MonaDB/tree/main/site/content/language)
- [Examples](https://github.com/rchowell/MonaDB/tree/main/site/content/examples)

## License

Apache-2.0 — see [LICENSE](LICENSE).

