Coder Social home page Coder Social logo

sqlite-utils-shell's Introduction

sqlite-utils-shell

PyPI Changelog Tests License

An interactive shell for sqlite-utils

Alternative: sqlite-utils-litecli is similar to this but better, because it includes full autocompletion against table and column names.

Installation

Install this plugin in the same environment as sqlite-utils.

sqlite-utils install sqlite-utils-shell

Usage

To start a new interactive shell session against a database:

sqlite-utils shell data.db

Type quit or exit to end the session.

Omit the filename to run against an in-memory database.

To load additional SQLite extensions pass their paths as one or more --load-extension arguments:

sqlite-utils shell data.db \
  --load-extension /path/to/extension.so

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd sqlite-utils-shell
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

sqlite-utils-shell's People

Contributors

simonw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sqlite-utils-shell's Issues

Proper tests

I haven't written tests for this yet because it's a tiny bit tricky testing something that runs against input from stdin interactively.

Smarter transaction handling

The user should be able to begin, commit and rollback transactions.

If they don't explicitly do this then insert/etc will be committed automatically for them when they hit return.

Initial prototype

Running this command will open the shell:

sqlite-utils shell data.db

Or omit the database for an in-memory shell.

It will behave in a similar way to the sqlite3 shell - but you'll have access to the extra SQL functions provided by plugins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.