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.3.tar.gz (15.1 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.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: migrador-0.1.3.tar.gz
  • Upload date:
  • Size: 15.1 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.3.tar.gz
Algorithm Hash digest
SHA256 427e9aa83b2f6ac27125fc7d74197e93148b443db215f8bcfbbddb1b5e2d4c39
MD5 2afba014bba53f9ff3c02816e0734379
BLAKE2b-256 249b165a4d2bc98ea451d78c431b046343df72b0806324b489bdbc10e7a1c818

See more details on using hashes here.

File details

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

File metadata

  • Download URL: migrador-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 41d1e106ac8fc6623e395e6e4d84069ee3fdefd82f87e711138c368763e50cfd
MD5 95e7d9918a8c81c911ba5722a79d85a9
BLAKE2b-256 b1858bd0d67a9ec1d1ae986625dd082cb8ca8dd1c8816d309e120f9c399914a4

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