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

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.0.tar.gz (13.4 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.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: migrador-0.1.0.tar.gz
  • Upload date:
  • Size: 13.4 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.0.tar.gz
Algorithm Hash digest
SHA256 3eb6d3172a4604ef2d5d2bbf6e6f592e6665daf6cdbb0a1b663d39e335227f31
MD5 47daee25f51df4374d77bb1a23a2de2a
BLAKE2b-256 64e1e886c2ef381b6199bf5598105d8ac9c9b2b12faa06c791cbf2d15c571121

See more details on using hashes here.

File details

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

File metadata

  • Download URL: migrador-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38ed1f66231e01aaf98fe1a8bb7eac92977048ac4d30db30747ee2c1cfeccd69
MD5 12f784aea7c88401e71924e17cf7e5a7
BLAKE2b-256 041329a9496968deae7ddff1e546872ec8a18dc37ecd39ab3e78f4dc20c3e118

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