table of contents
datapm(1) | Data package manager | datapm(1) |
NAME¶
datapm - data packaging system and utilitiesSYNOPSIS¶
datapm COMMAND [OPTIONS]DESCRIPTION¶
datapm (data package manager) is a command line tool and python library and for working with Data Packages and interacting with data hubs like those powered by CKANCOMMANDS¶
aboutAbout datapm
Download a package (i.e. metadata and
resources) specified by src-spec to path
Resources to retrieve are selected interactively if no format-pattern is
given. If provided, the optional glob-style format-pattern and
url-pattern arguments are matched against the format and url of the
resource to determine whether it should be retrieved.
Download a package (i.e. metadata and
resources) specified by src-spec to path
Resources to retrieve are selected interactively if no format-pattern is
given. If provided, the optional glob-style format-pattern and
url-pattern arguments are matched against the format and url of the
resource to determine whether it should be retrieved.
Dump contents of specified resource in
specified package to stdout.
Show available commands
Get information about a package (print package
metadata). If manifest specified then show manifest info rather than
package metadata.
WARNING: if you change the metadata for a python distribution you may need to
rebuild the egg-info for changes to show up here.
Initialize a data package at path. Package
Name will be taken from last portion of path. If path simply a name then
create in the current directory.
Show the license
List registered packages. If index-spec
is not provided use default index.
Show the manual
Push local package in current directory to
remote repository specified in .dpm/config. Alternatively push a single
file to the webstore.
Register package at src-spec into index
at dest-spec.
Search registered packages in
index-spec.
config [location]: Create
configuration file at location. If not location specified use
default (see --config).
index [location]: Setup an index
at location specified in config.
repo: Setup a repository. The
repository will be created at the location specified via the --repository
option or default location specified by config.
As for register.
Upload a file or package at path to
upload-spec. The upload-spec are of the form:
upload-dest-id://BUCKET/LABEL
For example:
## default ckan upload
ckan://BUCKET/LABEL
## an s3 upload destination
my-s3://BUCKET/LABEL
## local pairtree
my-pairtree://BUCKET/LABEL
## google storage
my-google-storage://BUCKET/LABEL
Upload destinations are specified in your datapm config file and are of the
form:
[upload:dest-id]
ofs.backend = s3|google|archive.org|...
## see OFS documentation for a given backend
config-option = config-value
upload-dest-id://BUCKET/LABEL
## default ckan upload
ckan://BUCKET/LABEL
## an s3 upload destination
my-s3://BUCKET/LABEL
## local pairtree
my-pairtree://BUCKET/LABEL
## google storage
my-google-storage://BUCKET/LABEL
[upload:dest-id]
ofs.backend = s3|google|archive.org|...
## see OFS documentation for a given backend
config-option = config-value
OPTIONS¶
--versionshow program's version number and exit
show this help message and exit
Give more output
Print debug output
Give less output
Log file where a complete (maximum verbosity)
record will be kept
Path to config file (if any) - defaults to
$HOME/.dpmrc
Path to repository - overrides value in
config
CKAN API Key (overrides value in config)
CONFIGURATION FILE¶
[dpm]
repo.default_path = $HOME/.dpm/repository
index.default = file
[index:ckan]
ckan.url = http://thedatahub.org/api/
ckan.api_key =
[index:db]
db.dburi = sqlite://$HOME/.datapm/repository/index.db
[upload:ckan]
ofs.backend = reststore
host = http://storage.ckan.net
FILES¶
~/.dpmrcPer user datapm configuration file.
EXAMPLES¶
Grabbing some data from an indexdatapm index-add file:///....
datapm update
datapm search "military spending"
some-id Military Spending 1890-1914
some-id-2 Military Spending 1890-1914 (normalized)
datapm install some-id
datapm plot some-id
datapm install pkg-a
datapm install pkg-b
datapm create merged
# manual merge
# e.g. PPP, GDP
datapm register my-merged-package
SEE ALSO¶
For more information visit the documentation at: http://readthedocs.org/docs/dpmFebruary 6, 2012 |