Skip to main content

The missing interactive shell for SQLAlchemy projects.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alchemist_shell-0.1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alchemist_shell-0.1.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file alchemist_shell-0.1.2.tar.gz.

File metadata

  • Download URL: alchemist_shell-0.1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.14.4 Linux/7.0.0-27-generic

File hashes

Hashes for alchemist_shell-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3429f645f8ca495274552afb66ec6abb51cec02195de04c26cc978237d66a45b
MD5 cbcbfd0b540b6aedee1b0ea390ed44e6
BLAKE2b-256 6ac14dfae3ea1e33754a0a64cdedac41099d98f26b2b7fd7abe6660aeaaba978

See more details on using hashes here.

File details

Details for the file alchemist_shell-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: alchemist_shell-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.14.4 Linux/7.0.0-27-generic

File hashes

Hashes for alchemist_shell-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3b19c1939ffbb8f417eafa8ec6d4a28bde154f09cf3bc25f07f197cac1a77c7e
MD5 4e79ddac4f0d208d32d8be800f7a564e
BLAKE2b-256 5a43e22fcca63114d640278e60cb36654be8cb250a8c2ff902741df781d06c28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page