Skip to main content

Import Frictionless Data Datapackages into SQLite and generate Datasette metadata

Project description

datapackage-to-datasette

Run tests codecov PyPI Version License Python Compatibility Code style: black

Import Frictionless Data Datapackages into SQLite and generate Datasette metadata.

Setup

pip install datapackage-to-datasette

Usage

On the console

Import a datapackage from a local file

datapackage-to-datasette mydatabase.db /path/to/datapackage.json metadata.json

or from a URL

datapackage-to-datasette mydatabase.db https://pkgstore.datahub.io/core/co2-ppm/10/datapackage.json metadata.json

If the datasette metadata file already exists, you can pass --write-mode replace or --write-mode merge to overwrite or merge with the existing datasette metadata file.

As a library

from datapackage_to_datasette import datapackage_to_datasette, DataImportError

try:
    datapackage_to_datasette(
        'mydatabase.db',
        '/path/to/datapackage.json',
        'metadata.json',
        write_mode='replace'
    )
except DataImportError:
    raise

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

datapackage_to_datasette-0.3.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file datapackage_to_datasette-0.3.1.tar.gz.

File metadata

File hashes

Hashes for datapackage_to_datasette-0.3.1.tar.gz
Algorithm Hash digest
SHA256 070b37dee721463ea69fe0840a87dab003b21d4d70dd26c19b33049bade79e3a
MD5 0cbf37fb88a6d055dcc9cb92bf8e81fe
BLAKE2b-256 dd8845c7d4ccfbc67017bda6dc3b173a8ea83fc92864e5263b1f98f8138bedb4

See more details on using hashes here.

File details

Details for the file datapackage_to_datasette-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for datapackage_to_datasette-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dede5c3a54c7a638336ca3193b8bd092a1e1fdda8ffd9c09f6364eed4baf9af6
MD5 daa310284f45155c67757b77717ec55c
BLAKE2b-256 bcd5a0f1b0bcc5fd52ef1e881b4fd550451a963aa50615d50057029e609cc6a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page