Skip to main content

A client library for Data Basin (http://databasin.org)

Project description

# python-databasin 0.4.1

[![Build Status](https://travis-ci.org/consbio/python-databasin.png?branch=master)](https://travis-ci.org/consbio/python-databasin) [![Coverage Status](https://coveralls.io/repos/consbio/python-databasin/badge.svg?branch=master&service=github)](https://coveralls.io/github/consbio/python-databasin?branch=master)

```python-databasin``` is a client library for interacting with [Data Basin](http://databasin.org).

# Install
```bash
$ pip install python-databasin
```

# Example usage
The code snippet below will import a NetCDF dataset into Data Basin and make it public. Note that the account you use
must have import permission and the import must have complete metadata and style information.

```python
from databasin.client import Client

c = Client()
c.login('user', 'pass')

# Package must have complete metadata and style necessary for one-step import
dataset = c.import_netcdf_dataset('/path/to/netcdf_with_metadata_and_style.zip')

# One-step imports are private by default
dataset.make_public()

print(dataset.id)
print(dataset.title)
```

You can also upload Esri layer packages (`.lpk`). As with NetCDF's, layer packages for now must have the all metadata
required by Data Basin to successfully import:

```python
dataset = c.import_lpk('/path/to/lpk_with_metadata.lpk')
print(dataset.id)
print(dataset.title)
```


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

python-databasin-0.4.1.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distributions

python_databasin-0.4.1-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

python_databasin-0.4.1-py2-none-any.whl (9.8 kB view hashes)

Uploaded Python 2

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