Skip to content

Daniel-Brai/Consola

Repository files navigation

Consola

Python Version License: MIT

A tiny interactive SQL console for exploring SQLAlchemy/SQLModel models and executing ad-hoc SQL against your project's database.

  • Quick start: Install consola and run the CLI to open an interactive REPL for your project with consola start.
  • Async and Sync Engines: It supports both sync and async SQLAlchemy engines and bridges async sessions with a sync-style API.

Installation

Consola is not published on PyPI. Install it directly from GitHub.

Using uv (recommended)

uv tool install "consola @ git+https://github.com/Daniel-Brai/Consola.git"

To install a specific version, append the tag:

uv tool install "consola @ git+https://github.com/Daniel-Brai/Consola.git@v0.1.0"

Using pip

pip install "consola @ git+https://github.com/Daniel-Brai/Consola.git"

To install a specific version:

pip install "consola @ git+https://github.com/Daniel-Brai/Consola.git@v0.1.0"

Verify the installation

consola --help

Motivation for Consola

I was inspired by the Rails Console in Ruby on Rails, a powerful interactive REPL that makes exploring models and querying the database effortless during development. I wanted the same convenience when working in Python projects that use SQLAlchemy/SQLModel. Consola brings that experience to Python by providing a lightweight, opinionated interactive console for inspecting models using Rails-like methods and running ad-hoc SQL using the model classes.

License

See LICENSE for details.

About

Interactive SQL console for SQLAlchemy inspired by Rails Console

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages