Convert your datapackages
Project description
Datapackage Convert
Conversions from tabular-data-packages. Currently:
- Merge mulitple datapackages into one.
- To SQLite
- To Parquet
- To XLSX
- To Postgres
All conversions aim to be memory efficiant and as fast they can be. This is the python library, providing bindings to the rust library.
Install
pip install datapackage-convert
Usage
When refering to a datapackage you can either reference:
- A
datapackage.json
file. - A datapackage directory containing a
datapackage.json
file. e.g./a/datapackage/dir
- A zip file containing a
datapackage.json
file. e.g.my_datapackage.zip
Merge datapackage
This will merge datapckages into a single one.
from datapackage_convert import merge_datapackage
merge_datapackage('output_datapackage', ['datapackage1', 'datapackage2'])
To SQLite
Will convert to sqlite file. Adding foreign key relationships and indexes for them.
from datapackage_convert import datapackage_to_sqlite
datapackage_to_sqlite('mydatabase.db', 'my_datapackage')
To parquet
Will convert to snappy compressed parquet files.
from datapackage_convert import datapackage_to_parquet
datapackage_to_parquet('output_directory', 'my_datapackage')
To xlsx
Will convert to XLSX files.
from datapackage_convert import datapackage_to_xlsx
datapackage_to_xlsx('output.xlsx', 'my_datapackage')
To postgres
Will insert data into postgres database.
from datapackage_convert import datapackage_to_postgres
datapackage_to_xlsx('postgres://name:pass@host/dbname', 'my_datapackage')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file datapackage_convert-0.5.2.tar.gz
.
File metadata
- Download URL: datapackage_convert-0.5.2.tar.gz
- Upload date:
- Size: 79.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c843da924d097349414dbdd483c4d953857d67a4d5225172b19819b4e588c9be |
|
MD5 | ee63c2446b7dadb4a624cea47b1ff027 |
|
BLAKE2b-256 | 888cee83a1586065160ae323c7c66f4af1bfe49d2b935bbc089f1c946604e177 |
File details
Details for the file datapackage_convert-0.5.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7593b3d38225c0eeb22ec55a8f303b76eaf452e0e08a0812629cda430910ddc5 |
|
MD5 | 7b7f2583595737acd1983e7a941eeeac |
|
BLAKE2b-256 | ff749a91698385c86cb66a2e30409489e922904f4f509930a631870923518bdf |
File details
Details for the file datapackage_convert-0.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a83870142383c89f08574ea5aedfe4cccb3deed23aa0c8e962de49214613ca0d |
|
MD5 | 848df48e20db7a9fd19d22771ee99392 |
|
BLAKE2b-256 | dbe8f66b20e8d90bf9c3d0e56afa88682db91b6af38518db8a434fe26d2470af |
File details
Details for the file datapackage_convert-0.5.2-cp310-none-win_amd64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp310-none-win_amd64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b6e9cbef9e7be7748c1d733b695e1c1946ed1463d2df97ee6718dda3d0e34e3 |
|
MD5 | d2e0c0af8f51123cdecc87d27513cbe1 |
|
BLAKE2b-256 | 7b245d495bf16ad2cad5805c9dedfc8e4fc44d3f14418aad00544a96b01dbe60 |
File details
Details for the file datapackage_convert-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4509a63d17cb408d083a61bef89ae038591046b4e0dc8dc739fff83cdf1756a9 |
|
MD5 | a1baf0e7f8ba3ff21b8329a3b8d07db2 |
|
BLAKE2b-256 | 7816fb0f57493b1747b234a6961f06571f02c5d298e033b5560ee716c8cc9a25 |
File details
Details for the file datapackage_convert-0.5.2-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 9.7 MB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97c0e2ea1977b4839206e61d626483d21445f1b8ddaf9930fdc64179a38f506e |
|
MD5 | 3174800b0b7c0e9fa0a8b747b068ed0b |
|
BLAKE2b-256 | 590db115c0835ff3e61d99c1d53cd92a27656362faef1effe8f6c6e488d6d14f |
File details
Details for the file datapackage_convert-0.5.2-cp310-cp310-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp310-cp310-macosx_10_7_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.10, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 031a0b87602531a0792e44f27e7ff6fe75c43724884e9b4d20363d8866bac788 |
|
MD5 | 84dce3777f5084aa6cae8a5852e17899 |
|
BLAKE2b-256 | cc7aacf1a8f6948581a5bd5f31ab9dcae78a93750e111a4d6ca6ce0d91d5173f |
File details
Details for the file datapackage_convert-0.5.2-cp39-none-win_amd64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp39-none-win_amd64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb71aa913b335693c3e7b99d1038c649eb2e58942948d83a083c743f29551d11 |
|
MD5 | fe2993f77c83bbad866283a2b7668b88 |
|
BLAKE2b-256 | 7615d801fa9fd416413f8607c218b2a60ce80d5046f0a128e69734a1bc492d68 |
File details
Details for the file datapackage_convert-0.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56aa825888d8cfb65b2d5cef52db87fd57289fb768eb166c7931988e3d24d7df |
|
MD5 | 3ea54e886427131ed2a8b3c90fa910e4 |
|
BLAKE2b-256 | 3db9f59776fa2d2afefbf7b100f968936242542aab66378e440c2d374caf12d7 |
File details
Details for the file datapackage_convert-0.5.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 9.7 MB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cb25a9c9b5f874607c6942246c1af65331336b2781565ee78959a5271be30d4 |
|
MD5 | 99a24347e128388317921ac0419ac37a |
|
BLAKE2b-256 | 6a62c185c25a3485c6610ce4d7317fe127bae819388e5c46473c7a3461a180e0 |
File details
Details for the file datapackage_convert-0.5.2-cp39-cp39-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp39-cp39-macosx_10_7_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.9, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48f69fdb15785b55d1fbb9d8a54dd94c02124ea2438f4ad332dc2249ec880d00 |
|
MD5 | b7839ccaec9f415c48de41ec2bddc29e |
|
BLAKE2b-256 | 710099bc31376bf2bac6c279abdd2bafae8eed6dbac31e020cce96c499b88e07 |
File details
Details for the file datapackage_convert-0.5.2-cp38-none-win_amd64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp38-none-win_amd64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 420e633a85fe84b668ade1892b344ff081c3d246f41b88308694d64ea912134b |
|
MD5 | b6d1c62502872a07188fa2c610e5a558 |
|
BLAKE2b-256 | 9d81ee7c5908c41629cccb6493f0d8080e51e4a42aa7671dce589f6855ecf232 |
File details
Details for the file datapackage_convert-0.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6865266be7a5464399fe8d37d21f071aa29276bcd1e6d3f9334859d6081a4e6 |
|
MD5 | a73aaaf9fa83d44a6acb68d45da41f6b |
|
BLAKE2b-256 | 9bfb76c04eb1d91c75fdc8ee4a9370faaeab1bd21a5d46cf2d3ac4843f592251 |
File details
Details for the file datapackage_convert-0.5.2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 9.7 MB
- Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c4cff3d6f61b79cfb699a683dda87a14e4cf4581d021a859acccb73fd78b5fc |
|
MD5 | ed8be17c9fc6abed46107fdaf9f672cc |
|
BLAKE2b-256 | e377d668f224b6c1811885e11eec26de531c3cfa22b9fefd70941a16321fe7e9 |
File details
Details for the file datapackage_convert-0.5.2-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.8, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0f9dfa0d34eeddb39a39d5025626c99b01f751de5ae94ca5116464480ede605 |
|
MD5 | 07769c216fec440c20345871bf99dfaa |
|
BLAKE2b-256 | 2e7eb4aa66c4c4cd27becbef7feea01333bffa4aac990f6384c5a0725104bcd4 |
File details
Details for the file datapackage_convert-0.5.2-cp37-none-win_amd64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp37-none-win_amd64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7847d2d2ca3daad79a8c41d0be1c0dcc3b70ae6d00530a6adb7f17c153e05de0 |
|
MD5 | 58349d149feb8757a412b2e92dd0ce33 |
|
BLAKE2b-256 | ae5bb811c27ae5df39e510152225dc2b43024830e579c7715b4481b021979473 |
File details
Details for the file datapackage_convert-0.5.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b632020f337acd1ae8413be30223b90e7886a5e93f13d613938e23236317d44f |
|
MD5 | abc4cdb76c7218b5b1f68041173ef791 |
|
BLAKE2b-256 | 76ce4601ddc91aed3f7e172f82845fa29541d1642d8d163fbc66356ec9a44e01 |
File details
Details for the file datapackage_convert-0.5.2-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 9.7 MB
- Tags: CPython 3.7m, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30d9ceb6150b98aa5a74c2d7472020c103af05855cdf20663000e176299908ad |
|
MD5 | 4f90a016e6b540564c77c62c6800a7cf |
|
BLAKE2b-256 | 05cfe669f4ca87f65e9f290fc1670f728beee7a61f573e3c4bad7f0da3b1f86f |
File details
Details for the file datapackage_convert-0.5.2-cp37-cp37m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: datapackage_convert-0.5.2-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f3e1836f974c8421531bd1373916da52d538563db5f27369758eac1379098dc |
|
MD5 | 58a3fdf70aa553ced0b6d349fa73d530 |
|
BLAKE2b-256 | e4a763a0b15761bd516ec6f0c363c3260532fd26181fcebdec5dbc2531eec607 |