Skip to main content

Turn any excel or csv into a sqlite database, while you see what you are doing.

Project description

migrador

Migrate Excel/CSV data into a SQLite table — interactively via a TUI, or in one command.

Usage

TUI

Launch without arguments to open the interactive TUI:

migrador
image image image image

Use the TUI to configure your migration and optionally save it as a JSON config file for later reuse.

One-liner

Run a saved migration config non-interactively:

migrador --input data.xlsx --database mydb.db --config migration.json --mode append

Options

Option Description
--input Path to the Excel or CSV file
--database Path to the SQLite database
--config Path to the migration JSON (created via the TUI)
--mode append, replace, or upsert
--join-col Column to upsert on (required when --mode=upsert)

As a library

from migrador import ExcelMigrator
import sqlite3

migrator = ExcelMigrator("data.xlsx", header_row=1, start_col="A")
print(migrator.columns())
conn = sqlite3.connect("mydb.db")
rows = migrator.to_sqlite({"A": "tag", "B": "description"}, conn, "my_table")

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

migrador-0.1.2.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

migrador-0.1.2-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file migrador-0.1.2.tar.gz.

File metadata

  • Download URL: migrador-0.1.2.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for migrador-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cad7348b7255b0914545b930a80a3c393e1268a2b8b7b8a5b3bc16d92e7e7475
MD5 1068985d45e914d228b74e7d45587704
BLAKE2b-256 0deee5c128a28a9572c7d13dd97f3847a120e1f401191ca0a1e785081bef88b1

See more details on using hashes here.

File details

Details for the file migrador-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: migrador-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for migrador-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dd5c26e919f273ef85ae8a3eb31b1bfb5136e473b1514aa0722ab2820fe2fc34
MD5 5220536a472a1bf979ca15471e80f095
BLAKE2b-256 c85ac3049768821a22649b65fd32efde276c2fe4a3d661436a3a60f32485f973

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