Skip to main content

Tiny pickle-based array database

Project description

Build Status codecov

The tinynpydb project

tinynpydb (tiny-en-py-db) is a tiny pickle-based numpy array database.

Installing

  • From PyPI

    pip install tinynpydb
    
  • Simply clone and from within the repo

    pip install -e .
    

Quickstart

Starting a DB is easy:

# import and create example
import tinynpydb as tnpdb

array = [1, 2, 3]

# start DB and dump array!
npdb = tnpdb.NumPyDB('testnpdb', mode="store")
npdb.dump(array, 0)

# retrieve array!
loaded_array = npdb.load(0)
print(loaded_array)

Re-using a DB is easy too:

# import and create example
import tinynpydb as tnpdb

# start DB in loading mode
npdb = tnpdb.NumPyDB('testnpdb', mode="load")

# retrieve array!
loaded_array = npdb.load(0)
print(loaded_array)

That's pretty much all we do

- This was inspired from SciTools NumpyDB implementation
[Scitools github repo](https://github.com/hplgit/scitools)
and we decided to mantain a tiny version of it.

We retain their choice of a 3-BSD License

Project details


Download files

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

Files for tinynpydb, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size tinynpydb-0.1.2.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page