Skip to main content

🔮 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:

  1. Manual Setup
    You shouldn't have to manually import every model and session helper just to check a record.

  2. 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.

  3. 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-fidelity rich tables 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.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alchemist-shell 0.1.7
File Size Uploaded
alchemist_shell-0.1.7.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alchemist-shell 0.1.7
File Interpreter ABI Platform
alchemist_shell-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / alchemist_shell-0.1.7.tar.gz

Download URL alchemist_shell-0.1.7.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7b3eda6f9fcf136010a577a4fb0d11300d7c89b611a424853debae0b69ed194a
BLAKE2b-256 checksum
How to use checksums
5d6686970b48d9b6816b9ba0da6645b851f3ab4cb2991bc7d165cf39f13dc0be
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.7-py3-none-any.whl

Download URL alchemist_shell-0.1.7-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c4364d880018303a9dc9afad85e17bd4c5927a649d5016d700429fccf95968f
BLAKE2b-256 checksum
How to use checksums
dc6187acfeda2947627c1d73205ad157df2aff7dae5b742f7501090fb7c77633
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 history Release notifications | RSS feed

0.1.13

2 release files

0.1.9

2 release files

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page