Yay, a base database! An abstraction layer allowing for common interactions with Mongo, CDCS and local directory databases and records.
Project description
The yabadaba package (short for “Yay, a base database!”) provides a mid-level abstraction layer for interacting with databases containing JSON/XML equivalent data records. The primary purpose of the yabadaba package is to make it easy to design user-friendly Python packages that can access and store content in a variety of database types.
In design, the yabadaba package consists of five major components:
Database classes that provide pythonic APIs to interact with databases. A base Database class defines common method calls for interacting with the records in a database, such as querying, adding, modifying, and deleting entries. Child classes of Database are then defined that implement the universal interaction methods for a given type of database.
A base Record class provides a template for interpreting single database entries. Developers are meant to specify unique Record classes for each unique schema that is part of their project. In this way, users can interface with the data both in its raw format and using class-specific methods and attributes. Each Record class also allows for database query operations to be defined that allow for filtering of any hosted records based on meaningful fields of the Record’s schema.
A ModuleManager class is defined that helps treat the child classes of the Database and Record classes in a modular fashion. In particular, the ModuleManagers allow for the code to work even if there are issues with any of the child classes, and make it possible for packages that import the managers to append their own child classes.
Generic query methods are also provided that support the construction of the record-specific query operations. In short, these are meant to allow for queries to operate efficiently across all of the database types and ideally return identical responses despite the underlying infrastructure differences.
A Settings class is provided that makes it possible for users to save access parameters for a database under a simple name that can then be reloaded in a later session.
Package developers that want to provide APIs to any associated databases can simply import the various components of yabadaba and define their own Record classes that are specific to their own data. Users of the resulting packages can then easily explore the data, make their own copies, etc.
Installation
The yabadaba package can easily be installed using pip or conda-forge
pip install yabadaba
- or
conda install -c conda-forge yabadaba
Documentation
Documentation can be found in the doc folder in the github repository.
For support, post a issue to github or email lucas.hale@nist.gov.
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
Built Distribution
File details
Details for the file yabadaba-0.2.2.tar.gz
.
File metadata
- Download URL: yabadaba-0.2.2.tar.gz
- Upload date:
- Size: 47.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7bbe60bac4828568a0c7c93162a77248256165a06223768621bd58c8668654a |
|
MD5 | 794fcafd07e9a5f5e215ae9599899221 |
|
BLAKE2b-256 | f582389ef6a00dd36588d7bd0ca835b6bc51b5bfb579e316b0a4369c533eaad6 |
File details
Details for the file yabadaba-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: yabadaba-0.2.2-py3-none-any.whl
- Upload date:
- Size: 66.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 563df975282bbe890144124e21dfff8b0c3d4142e054aab3a8e9bf796cf51c53 |
|
MD5 | 08f8bb713dcaeac7f7152996593951e9 |
|
BLAKE2b-256 | 0ea96a77b640a77fb4139c44bac7f41170e58d1a7369923e0118155e472ab45b |