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.1.tar.gz (6.2 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.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alchemist_shell-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.12.3 Linux/6.17.0-19-generic

File hashes

Hashes for alchemist_shell-0.1.1.tar.gz
Algorithm Hash digest
SHA256 693a77ef8da1e16f29ea7eee2dafd6e631257380315bd847c54382a69ca10f02
MD5 6c2eb3c8230b956909aac7ce5e83e29e
BLAKE2b-256 bf04b400ba0031c970e45dc7a0edf2da20b8ca0fac0df76d51d6affa17cfd899

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alchemist_shell-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.12.3 Linux/6.17.0-19-generic

File hashes

Hashes for alchemist_shell-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7db05011d2a40c70dc780962832cca84c8ef8c08124e8ff210fa665dfcc7330d
MD5 22d1333bd9b8bac066fcd3664d8103c9
BLAKE2b-256 f4a91ef8da55432d2f7c8a4b0a9db08619d83471f7db7e36f04b2a6e8003ecc4

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