Skip to main content

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 foo.csv --rows 'total < 1000'`

Usage
-----

```
usage: catsql [-h] [--table [TABLE [TABLE ...]]] [--row [ROW [ROW ...]]]
[--bare] [--csv]
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,
data.csv

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.
--bare Show table and column names, skip actual data.
--csv Output strictly in CSV format.
```

License
-------

MIT

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

catsql-0.1.5.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file catsql-0.1.5.tar.gz.

File metadata

  • Download URL: catsql-0.1.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for catsql-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f2cfbdb038545bfa5de42e85cf1e3a2ee76acc0f01fe288821879d3157c5e8fd
MD5 a99106d0e0d94d9be8c42ac5e0244700
BLAKE2b-256 c11886ba5a90391f840b9e288d2ccd707927a36bf58fb987099366b57e42ba4c

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