Skip to main content

No project description provided

Project description

duckdb-utils: CLI tool and Python library for manipulating DuckDB databases

Github PyPI Documentation Status Linkedin Github Sponsors pip installs Tests codecov License

Inspired by [sqlite-utils]

CLI

Usage: duckdb-utils [OPTIONS] COMMAND [ARGS]...

  Commands for interacting with a DuckDB database

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  query*
  create-table  Add a table with the specified columns.
  insert        Insert records from FILE into a table, creating the table...
  tables        List the tables in the database
  views         List the views in the database

duckdb-utils create-table

Usage: duckdb-utils create-table [OPTIONS] PATH TABLE COLUMNS...

  Add a table with the specified columns. Columns should be specified using
  name, type pairs, for example:

      duckdb-utils create-table my.db people \
          id integer \
          name text \
          height float \
          photo blob --pk id

  Valid column types are text, integer, float and blob.

Options:
  --pk TEXT                 Column to use as primary key
  --not-null TEXT           Columns that should be created as NOT NULL
  --default <TEXT TEXT>...  Default value that should be set for a column
  --fk <TEXT TEXT TEXT>...  Column, other table, other column to set as a
                            foreign key
  --ignore                  If table already exists, do nothing
  --replace                 If table already exists, replace it
  --transform               If table already exists, try to transform the
                            schema
  --load-extension TEXT     Path to SQLite extension, with optional
                            :entrypoint
  --strict                  Apply STRICT mode to created table
  -h, --help                Show this message and exit.

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

duckdb_utils-0.1.0a2.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

duckdb_utils-0.1.0a2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file duckdb_utils-0.1.0a2.tar.gz.

File metadata

  • Download URL: duckdb_utils-0.1.0a2.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for duckdb_utils-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 464c3bccf11bbf9c4d9afe029ac79ca9ff35da829988755bc3082ce11bc0c4e5
MD5 4437fd5a6eb1598fdad1756bdfbe21ad
BLAKE2b-256 7f8afca49b6a64be9fc1f34fcfcb8c2bc7150929df073307f2310a2595aa9ed0

See more details on using hashes here.

File details

Details for the file duckdb_utils-0.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for duckdb_utils-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 31f720f8823bc9073cc7336e23ec71baf50935eeb6c6b819c0b7f3805d0a0f8f
MD5 79422811c5221b158602c9f8f14c2da6
BLAKE2b-256 8e4e924f0edddbd18f929a8603ed517f0f938607c7fd04232ae86d6ca908802b

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