Display quick view from sql databases
Project description
catsql
======
Quickly display (part of) a database. Thin wrapper around SQLAlchemy.
Pronounced "cat-skill" for some reason.
Installation
------------
`pip install catsql`
Examples
--------
* `catsql example.sqlite`
* `catsql postgres://foo:bar@thing.rds.amazonaws.com:5432/database`
* `catsql example.sqlite --table users`
* `catsql $DATABASE_URL --table users --edit` - edit your database, I
know, why does `cat` have an editor, there are good^H^H^H^H reasons believe
me.
Usage
-----
```
usage: catsql [-h] [--table [TABLE [TABLE ...]]] [--row [ROW [ROW ...]]]
[--context [CONTEXT [CONTEXT ...]]] [--hide-context] [--count]
[--csv] [--save-bookmark SAVE_BOOKMARK] [--load-bookmark]
[--edit] [--safe-null]
url
Quickly display (part of) a database.
positional arguments:
url Database url or filename. Examples: sqlite:///data.db,
mysql://user:pass@host/db,
postgres[ql]://user:pass@host/db, data.sqlite3
optional arguments:
-h, --help show this help message and exit
--table [TABLE [TABLE ...]]
Tables to include (defaults to all tables)
--row [ROW [ROW ...]]
Filters for rows to include. Examples: "total < 1000",
"name = 'american_bison'". Tables that don't have the
columns mentioned are omitted.
--context [CONTEXT [CONTEXT ...]]
key=value filters
--hide-context Hide any columns mentioned in context filters
--count Show row counts instead of actual data.
--csv Output strictly in CSV format.
--save-bookmark SAVE_BOOKMARK
File to save link information in
--load-bookmark File to load link information from
--edit Edit original table in your favorite editor (multiple
tables not yet supported)
--safe-null Encode nulls in a reversible way
```
License
-------
MIT
======
Quickly display (part of) a database. Thin wrapper around SQLAlchemy.
Pronounced "cat-skill" for some reason.
Installation
------------
`pip install catsql`
Examples
--------
* `catsql example.sqlite`
* `catsql postgres://foo:bar@thing.rds.amazonaws.com:5432/database`
* `catsql example.sqlite --table users`
* `catsql $DATABASE_URL --table users --edit` - edit your database, I
know, why does `cat` have an editor, there are good^H^H^H^H reasons believe
me.
Usage
-----
```
usage: catsql [-h] [--table [TABLE [TABLE ...]]] [--row [ROW [ROW ...]]]
[--context [CONTEXT [CONTEXT ...]]] [--hide-context] [--count]
[--csv] [--save-bookmark SAVE_BOOKMARK] [--load-bookmark]
[--edit] [--safe-null]
url
Quickly display (part of) a database.
positional arguments:
url Database url or filename. Examples: sqlite:///data.db,
mysql://user:pass@host/db,
postgres[ql]://user:pass@host/db, data.sqlite3
optional arguments:
-h, --help show this help message and exit
--table [TABLE [TABLE ...]]
Tables to include (defaults to all tables)
--row [ROW [ROW ...]]
Filters for rows to include. Examples: "total < 1000",
"name = 'american_bison'". Tables that don't have the
columns mentioned are omitted.
--context [CONTEXT [CONTEXT ...]]
key=value filters
--hide-context Hide any columns mentioned in context filters
--count Show row counts instead of actual data.
--csv Output strictly in CSV format.
--save-bookmark SAVE_BOOKMARK
File to save link information in
--load-bookmark File to load link information from
--edit Edit original table in your favorite editor (multiple
tables not yet supported)
--safe-null Encode nulls in a reversible way
```
License
-------
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
catsql-0.1.16.tar.gz
(7.3 kB
view details)
File details
Details for the file catsql-0.1.16.tar.gz
.
File metadata
- Download URL: catsql-0.1.16.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1eb77ea7f6891cb74a2a099a552c2a9e7284dc87e29b692494da8fc55d1c943 |
|
MD5 | d8b7d30aef568861a30dd45d8c34507e |
|
BLAKE2b-256 | a232e919c861ae8a1568c487f6cf3cfdfd296175616abb2a1594b7c0e443363a |