<commit_before>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:<EMAIL>: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<commit_msg>bring README up to date<commit_after>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:<EMAIL>: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
{'fraction_non_alphanumeric': 0.13333333333333333, 'fraction_numerical': 0.00632183908045977, 'mean_word_length': 1.6776923076923076, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '158631', 'n_tokens_mistral': 1013, 'n_tokens_neox': 940, 'n_words': 325}