Skip to main content

sqlcli

PyPI version PyPI - Downloads

A command line interface (CLI) for interacting with SQLModel.


Source code: https://github.com/SamEdwardes/sqlcli

Docs: https://samedwardes.github.io/sqlcli/

PyPi: https://pypi.org/project/sqlcli/


Features

The key features are:

  • Read data using the sqlcli select command.
  • Insert data using the sqlcli insert command.
  • Interactive console powered by typer, rich, and sqlmodel.
  • Pretty terminal outputs generated by rich.
  • Multiple output formats including rich, json, and python dictionaries.

Installation

You can install sqlcli using pip:

pip install sqlcli

This will make the sqlcli command available in your python environment.

Usage

The quickest way to get started with sqlcli is to create a demo sqlite database:

sqlcli init-demo

This will create a small sqlite database on your computer. The you can use sqlcli to explore your database. View your table by using the select command.

sqlcli select athlete -d "sqlite:///sqlcli_demo/database.db" -m "sqlcli_demo/models.py"
┏━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓
┃ id ┃ name     ┃ sport_id ┃
┡━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩
│ 1  │ Ronaldo  │ 1        │
│ 2  │ Messi    │ 1        │
│ 3  │ Beckham  │ 1        │
│ 4  │ Gretzky  │ 2        │
│ 5  │ Crosby   │ 2        │
│ 6  │ Ovechkin │ 2        │
│ 7  │ Sundin   │ 2        │
│ 8  │ Domi     │ 2        │
│ 9  │ Carter   │ 1        │
└────┴──────────┴──────────┘

Metadata

Release files for sqlcli 0.1.0

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

Source distribution (sdist)

Source distribution for sqlcli 0.1.0
File Size Uploaded
sqlcli-0.1.0.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlcli 0.1.0
File Interpreter ABI Platform
sqlcli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / sqlcli-0.1.0.tar.gz

Download URL sqlcli-0.1.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ba35353dfaef60421cdd752dd954b9e1824c20c75919cf3ae3df03bc5762b2a3
BLAKE2b-256 checksum
How to use checksums
8a1f98fdf67f03f56be5bcc52d4e66c463a8c8535e1e734a48b26e35cbbca376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.9.4 Darwin/20.4.0

Release files / sqlcli-0.1.0-py3-none-any.whl

Download URL sqlcli-0.1.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83e330d369fac1fa80aca5e3f7566ed1b887dfa1a7e3532d08d9dd8c4f82fc1e
BLAKE2b-256 checksum
How to use checksums
eb89337040d8f426f763e3ef499d0da15406d220796f800eff80c0d513e2887a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.9.4 Darwin/20.4.0
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