Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonw/sqlite-utils-shell
Interactive shell for sqlite-utils
https://github.com/simonw/sqlite-utils-shell
Last synced: 4 months ago
JSON representation
Interactive shell for sqlite-utils
- Host: GitHub
- URL: https://github.com/simonw/sqlite-utils-shell
- Owner: simonw
- License: apache-2.0
- Created: 2023-07-24T03:21:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-21T06:24:17.000Z (about 1 year ago)
- Last Synced: 2024-10-06T20:19:13.400Z (5 months ago)
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlite-utils-shell
[](https://pypi.org/project/sqlite-utils-shell/)
[](https://github.com/simonw/sqlite-utils-shell/releases)
[](https://github.com/simonw/sqlite-utils-shell/actions?query=workflow%3ATest)
[](https://github.com/simonw/sqlite-utils-shell/blob/main/LICENSE)An interactive shell for [sqlite-utils](https://sqlite-utils.datasette.io/)
**Alternative**: [sqlite-utils-litecli](https://github.com/simonw/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.
```bash
sqlite-utils install sqlite-utils-shell
```## Usage
To start a new interactive shell session against a database:
```bash
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:
```bash
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/activateNow install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest