Skip to main content

Data packaging system using Metatab

Project description

Parse and manipulate structured data and metadata in a tabular format.

Metatab is a data format that allows structured metadata – the sort you’d normally store in JSON, YAML or XML – to be stored and edited in tabular forms like CSV or Excel. Metatab files look exactly like you’d expect, so they are very easy for non-technical users to read and edit, using tools they already have. Metatab is an excellent format for creating, storing and transmitting metadata. For more information about metatab, visit http://metatab.org.

Metapack is a packaging system that uses Metatab to create Zip, Excel and filesystem data packages.

This repository has a Python module and executable. For a Javascript version, see the metatab-js repository.

Install

Metapack only works with Python 3.5 or later, and you’ll almost certainly want to install it into a virtual environment. To set up a virtual environment:

python3 -mvenv metapack
cd metapack
source bin/activate

Since we’re stil in development, you’ll get the latest code by installing package from github, but you can also install from pip. In either case, you should create the virtualenv, and afterward, you’ll have to reinstall the six package because of an odd conflict

To install the package with pip:

pip install metapack

Because the fs package has an odd version requirement on six, you’ll have to fix the version:

pip uninstall -y six
pip install six==1.10.0

To run the tests, you’ll also need to install some support modules;

$ pip install fiona shapely pyproj terminaltables geopandas

Then test parsing using a remote file with the metatab program, from the metatab module:

$ metatab -j https://raw.githubusercontent.com/CivicKnowledge/metatab-py/master/test-data/example1.csv

Run metatab -h to get other program options.

The test-data directory has test files that also serve as examples to parse. You can either clone the repo and parse them from the files, or from the Github page for the file, click on the raw button to get raw view of the flie, then copy the URL.

The main program for metapack is mt, which has a number of ( extensible) sub commands. See the commands with: mt -h.

Getting Started

See Getting Started for an initial tutorial, or the other guides in the docs directory on Github

Project details


Release history Release notifications

History Node

0.8.10

History Node

0.8.9

History Node

0.8.8

History Node

0.8.7

History Node

0.8.6

History Node

0.8.5

History Node

0.8.3

History Node

0.8.2

History Node

0.8.1

History Node

0.8.0

History Node

0.7.14

History Node

0.7.13

History Node

0.7.12

History Node

0.7.11

History Node

0.7.10

History Node

0.7.9

History Node

0.7.8

History Node

0.7.6

History Node

0.7.5

History Node

0.7.4

History Node

0.7.3

History Node

0.7.2

History Node

0.7.0

History Node

0.6.23

History Node

0.6.22

History Node

0.6.21

History Node

0.6.19

History Node

0.6.18

This version
History Node

0.6.17

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
metapack-0.6.17.tar.gz (78.5 kB) Copy SHA256 hash SHA256 Source None Nov 14, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page