Description
csv2postgresql imports data from a CSV file into PostgreSQL.
It differs from PostgreSQL COPY FROM ... WITH (FORMAT CSV ...) command as it
detects automatically the CSV columns available, so even CSV files with missing
columns or having columns arranged in a different order can be easily imported.
Setup
The software can be installed using pip or pipx, which is preferred.
pipx install csv2postgresql
Help
$ csv2postgresql --help
usage: csv2postgresql [-h] [--input-file INPUT_FILE] [--delimiter DELIMITER] [--quotechar QUOTECHAR]
[--escapechar ESCAPECHAR] [--encoding ENCODING]
dsn table
Load CSV with header into PostgreSQL
positional arguments:
dsn
table
optional arguments:
-h, --help show this help message and exit
--input-file INPUT_FILE, -i INPUT_FILE
Input file name containing a valid CSV.
--delimiter DELIMITER, -d DELIMITER
--quotechar QUOTECHAR
--escapechar ESCAPECHAR
--encoding ENCODING, -e ENCODING
Example
csv2postgresql -i table.csv postgresql://user:password@localhost/db table
Metadata
Release files for csv2postgresql 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| csv2postgresql-0.1.3.tar.gz | 14.6 kB | Without provenance | Details for csv2postgresql-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| csv2postgresql-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for csv2postgresql-0.1.3-py3-none-any.whl |
Total release size: 29.7 kB
Release files / csv2postgresql-0.1.3.tar.gz
| Download URL | csv2postgresql-0.1.3.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbd168e6ebf7a64cffa8acba0c8d9581c361a25813a5568bb6fb041428560b81
|
|
BLAKE2b-256 checksum How to use checksums |
73d2ec99726031832cf302c695a8571d01d704e77d776769d168c088f391f9ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / csv2postgresql-0.1.3-py3-none-any.whl
| Download URL | csv2postgresql-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0af3eb61a6d86fb000b4553c0b9db407cdf3cb52cb26981cc897743ba509faa
|
|
BLAKE2b-256 checksum How to use checksums |
2708ea27b0f65a13dfdd011ea9522f1b073c51aa67c2633c19efdfc4b4833941
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for csv2postgresql 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.