Skip to main content

Read csv and insert into DB

Requirements

  • Python 3.x

  • hashlib

  • pandas

  • sqlalchemy

  • shelve

  • numpy

Installation

$ pip install pycsvdb

Example

from pycsvdb import CsvManage

CsvManage(db_config_file="config.ini", file_name="filename.csv", primary_key="id", table_name="table_name")

Confi.ini format

[DB]


sqlalchemy.url = postgresql://postgres:password@localhost:5432/postgres

stage_schema = stage_table

prod_schema = prod_table

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycsvdb-2.3.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file pycsvdb-2.3.tar.gz.

File metadata

  • Download URL: pycsvdb-2.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pycsvdb-2.3.tar.gz
Algorithm Hash digest
SHA256 e75990e125237c34c963903d2276edcb69e535aa2216d0b07f2c2027ac2125ec
MD5 ba415479af68e5722e621f4172f8d612
BLAKE2b-256 0222c326bbb999b0e9815a83aefbdbfa01ec84f9badde04ffe4d3b96ff1ee0b5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.3 This release

1 file

2.1

1 file

1.9

1 file

1.8

1 file

1.7

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page