🔮 Alchemist Shell
The missing interactive shell for SQLAlchemy.
Working with SQLAlchemy in a standard REPL is painful. You have to manually manage imports, handle async event loops, and deal with unreadable object representations. Alchemist Shell turns your terminal into a powerful, zero-setup database workbench.
🛠 Why this exists?
The current workflow for inspecting SQLAlchemy projects in the terminal is broken:
-
Manual Setup
You shouldn't have to manually import every model and session helper just to check a record. -
Manual Session Management
In interactive environments, setting up and managing a session is repetitive boilerplate.
Creating engines, instantiating sessions, and keeping them alive just to run a few queries breaks the flow. -
Bad Visibility
Default object reprs like<User 1>tell you nothing. You deserve to see your data clearly.
✨ DX Features
-
Auto-Discovery
Recursively scans your project and injects all models into the namespace instantly. -
Pre-loaded Toolkit
select,func,text, and other SQLAlchemy essentials are available on startup. -
Auto-Formatting
Model instances render as high-fidelityrichtables when evaluated. -
Modern Shell
Powered by IPython with completion, syntax highlighting, and history-based autosuggestions.
📦 Installation
pip install alchemist-shell
🧪 The Workflow
1. Initialize the shell
Interact with your db having to manually load your session:
alchemist shell
2. Run queries directly on the terminal
All your SQLAlchemy models are autodiscovered and imported:
alchemist ❯ user = User(username="alchemist")
alchemist ❯ await db.add(user)
alchemist ❯ await db.commit()
2. Immediate Feedback
View your database objects as a formated table without creating a sophisticated __repr__ method:
alchemist ❯ user
# Renders a clean table with all column values
3. Native Async Queries
Full auto-await support when you need complex queries:
alchemist ❯ results = await db.execute(select(Order))
alchemist ❯ orders = results.scalars().all()
📜 License
MIT License. Permissive and simple.
Built to make SQLAlchemy development suck less.
Release files for alchemist-shell 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alchemist_shell-0.1.9.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alchemist_shell-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / alchemist_shell-0.1.9.tar.gz
| Download URL | alchemist_shell-0.1.9.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18d96dd98e0a49262a9d55a74b4cfa43f03b14312e4d9b3ff6ddd9a8b4f891db
|
|
BLAKE2b-256 checksum How to use checksums |
001b3bee9c6e1a89a675142e5c6dc2fb32c4bbac662ebbb0759b9075223f5631
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.14.4 Linux/7.0.0-28-generic
|
Release files / alchemist_shell-0.1.9-py3-none-any.whl
| Download URL | alchemist_shell-0.1.9-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e60cef7f42d0fefc20dac3ae7a4f08f145de0a1e32bd844808db8b5baedefb4
|
|
BLAKE2b-256 checksum How to use checksums |
07b3f0369b596efd2b7ccee36521feb81f08f4fd2adca14bf75c6cf9f28d03b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.14.4 Linux/7.0.0-28-generic
|