Skip to main content

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

Project description

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        │
└────┴──────────┴──────────┘

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

sqlcli-0.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

sqlcli-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file sqlcli-0.1.0.tar.gz.

File metadata

  • Download URL: sqlcli-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.4 Darwin/20.4.0

File hashes

Hashes for sqlcli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba35353dfaef60421cdd752dd954b9e1824c20c75919cf3ae3df03bc5762b2a3
MD5 96f263f354e32d970426b7da24768088
BLAKE2b-256 8a1f98fdf67f03f56be5bcc52d4e66c463a8c8535e1e734a48b26e35cbbca376

See more details on using hashes here.

File details

Details for the file sqlcli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sqlcli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.4 Darwin/20.4.0

File hashes

Hashes for sqlcli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83e330d369fac1fa80aca5e3f7566ed1b887dfa1a7e3532d08d9dd8c4f82fc1e
MD5 6572d0354b8be4f8bd814e3e06d183e8
BLAKE2b-256 eb89337040d8f426f763e3ef499d0da15406d220796f800eff80c0d513e2887a

See more details on using hashes here.

Supported by

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