Skip to content

DouglasNeuroInformatics/DatabankPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

DatabankPy

A set of utilities for programmatic access to the DNP databank
Explore the docs »

Access Bank · Report Bug · Request Feature

PyPI PyPI - License PyPI - Python Version


About

This library includes wrapper functions for interacting with the API of our databank.

Installation

pip install databankpy

Basic Usage

Create Dataset

import os

from databankpy.dataset import Dataset

iris = Dataset({
    'name': 'Iris',
    'description': "A small classic dataset from Fisher, 1936",
    'license': 'PUBLIC_DOMAIN',
    'columns': {
        'SEPAL_LENGTH': {
            'description': 'sepal length in cm',
            'nullable': False,
            'type': 'FLOAT'
        },
        'SEPAL_WIDTH': {
            'description': 'sepal width in cm',
            'nullable': False,
            'type': 'FLOAT'
        },
        'PETAL_LENGTH': {
            'description': 'petal length in cm',
            'nullable': False,
            'type': 'FLOAT'
        },
        'PETAL_WIDTH': {
            'description': 'petal width in cm',
            'nullable': False,
            'type': 'FLOAT'
        },
        'SPECIES': {
            'description': 'species of iris',
            'nullable': False,
            'type': 'STRING'
        }
    }
})

iris.append_csv(os.path.abspath(os.path.join('data', 'iris.csv')))

email, password = os.environ['DATABANK_EMAIL'], os.environ['DATABANK_PASSWORD']
iris.upload(email, password)

Development Setup

Install Dependencies

pip install ".[dev]"

Build

python -m build

Deploy

python -m twine upload dist/*

Build Docs

make -C docs html && http-server -c-1 docs/build/html

About

DatabankPy is a set of utilities for programmatic access to the DNP databank

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages