Skip to main content

tool for creating catalog from .csv tables in sqlite storage

Project description

CSVCatalog

a simple cli tool for wrangling csv files and shoving them into a sqlite database. no more manual scripts, no more headaches

What's this? 🤔

tired of messing around with csvs and databases separately? me too. that's why i built catalog. it's a simple, no-nonsense tool that lets you:

  • import csv files into a sqlite database with an interactive wizard.
  • search your data with a powerful, flexible query syntax.
  • export your data back to csv whenever you need it.
  • manage your database with a set of easy-to-use commands.

Getting Started 🚀

  1. install
pip install csvcatalog
  1. run a command

the basic structure is csvcatalog COMMAND [ARGS]. for example, to see all tables:

csvcatalog tables

by default, the database is stored in a user-specific data directory. you can specify a custom database file with the dbfile command:

# Optional
csvcatalog dbfile /path/to/your/database.db

Commands 🕹️

typer provides help for all commands. just run csvcatalog --help or csvcatalog <command> --help.

  • --help: get detailed help and command list
  • extract <file.csv>: run an interactive wizard to import a csv file into the database. you'll be prompted to set the separator, rename columns, select columns to import, and name the table.
  • tables: list all tables in the database, with their columns and row counts.
  • search <value> [targets...]: search for a value. this is the most powerful command.
  • sql "<query>": execute a raw sql query on the database.
  • export <table_name>: export a table to a csv file, with an interactive prompt to select columns and limit rows.
  • delete <table_name>: delete a table from the database.
  • purge: delete all tables from the database.
  • settings --help: settings help.
  • settings dbfile <path/to/storage.db>: set custom db path.
  • settings encryption <true/false>: enable encryption

the mighty search command

the search command lets you specify exactly where to look for your data. a "target" can be a table, a specific column in a table, or a column across all tables.

search for a value in all tables (default behavior):

# looks for 'jane' everywhere
csvcatalog search "jane"

search for a value in specific tables:

# looks for 'jane' in the 'users' and 'customers' tables
csvcatalog search "jane" users customers

search for a value in a specific column of a specific table:

# looks for the email in the 'email' column of the 'users' table
csvcatalog search "jane.doe@example.com" users.email

search for a value in a specific column across all tables:

# finds any entry with a 'status' of 'active' in any table
csvcatalog search "active" "*.status"

combine any of these targets in one command:

# a totally valid and powerful query
csvcatalog search "jane" users.name products

contributing are welcome 🤝

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

csvcatalog-2.5.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csvcatalog-2.5-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file csvcatalog-2.5.tar.gz.

File metadata

  • Download URL: csvcatalog-2.5.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for csvcatalog-2.5.tar.gz
Algorithm Hash digest
SHA256 120d300a100aefc08d24b8129db826a901462c4073ce5d7adfc2235021e2964f
MD5 69ba6fc35580c3217f82a65d97b9d449
BLAKE2b-256 02f4221a0f5fd6b10d98fb97f6427943e346f72c5682a76b08400abd52294876

See more details on using hashes here.

File details

Details for the file csvcatalog-2.5-py3-none-any.whl.

File metadata

  • Download URL: csvcatalog-2.5-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for csvcatalog-2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 43a63376e28db82ac6c7d63666e385a3fe2072bab887f71db71aef78ea625b49
MD5 71e1ca49aede7e89f48a98bfba0aea7a
BLAKE2b-256 bda2e6ea3bfc62db90a5171cd2604b187ebf54b77464912ca0083861fa05416b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page