Skip to main content

The yabadaba package (short for “Yay, a base database!”) is meant to make it easy to design user-friendly Python packages that can access and store content in a variety of database types. This is accomplished by defining mid-level abstractions of databases and database records.

The conceptual ideas behind yabadaba and what it intends to accomplish are

  • FAIR data exists in a variety of open access databases. While the FAIR data principles provide guidelines for how to make the data more accessible in general, there are no specifics about standardizing database infrastructure, query APIs, or data schemas. This results in a complex ecosystem where anyone wishing to access data from such a database must become familiar with the data and database infrastructure used.

  • Developing, implementing and enforcing standardization of data and databases is a complex task that requires agreement with a large number of separate entities even within the same community. Additionally, it may place too many limitations on further data evolution and/or be difficult for smaller groups to adhere to.

  • Alternatively, the problem can be solved at a higher level. Rather than force uniformity at the data level, tools can be developed that are capable of transforming data between different representations. This is what yabadaba aims to do.

  • By managing database interactions and data transformations, yabadaba makes it possible to interact with data from multiple databases and database infrastructures in similar ways. This increases the accessibility of the data as users of the data do not need to become experts in every database infrastructure and every data schema.

Package design

The yabadaba package itself is not meant to be an end-user package per-se, but a toolset for data generators and maintainers to easily create their own packages that serve as user-friendly APIs to their own data. To this end, yabadaba defines a number of base and utility classes that allow those yadabada-based packages to build upon yabadaba in a modular fashion.

The core base classes defined by yabadaba are

  • Database 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 database infrastructure.

  • Record defines methods that allow for the interpretation and transformation of a single database entry of a given schema to/from different data representations. Notably, the record interprets the data into python values and objects that are easy for users to interact with while also making the data accessible in and convertible to different raw storage formats. At the bare minimum, child classes of Record specify the data values contained within a specific schema so the methods in the base Record class can properly work. One way to think about this is that you create a python object to represent and allow users to interact with some of your data and you simply allow it to inherit from the base Record class to provide the framework for saving and loading the content.

  • Value defines methods that allow for the interpretation and transformation of the component values contained within a record. Child classes of Value specify how to perform those operations for different data types and structures, and can specify one or more default query operations to build for the value. Each Record subclass defines a dict of Value objects providing a schema for the data and the basis for performing the data transformations.

  • Query defines methods that build database query operations for the different database infrastructures. The child classes of Query focus on one specific query operation and define different methods to efficiently perform that operation in the different database infrastructures. Query objects are typically associated with Value objects to specify how to query based on the values of specific elements in a Record.

  • ModuleManager provides a common interface for managing the various subclasses of Database, Record, Value, and Query in a modular way. The ModuleManager objects dynamically import the subclasses such that they are fully integrated with each other and the features of yabadaba. Packages that build on yabadaba can then add their own subclasses to the managers and take advantage of yabadaba’s capabilities.

  • Settings provides a means of saving and loading settings across different python settings. Primarily, this is used to store database access and authentication information for databases that are frequently used. This class can easily be extended to manage other settings for yadabada-based projects.

  • UnitConverter provides simple tools for managing unit conversions.

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 and demonstration Notebooks for yabadaba can be found in the doc folder in the github repository.

For support, post a issue to github or email lucas.hale@nist.gov.

Download files

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

Source Distribution

yabadaba-0.4.0.tar.gz (56.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yabadaba-0.4.0-py3-none-any.whl (95.5 kB view details)

Uploaded Python 3

File details

Details for the file yabadaba-0.4.0.tar.gz.

File metadata

  • Download URL: yabadaba-0.4.0.tar.gz
  • Upload date:
  • Size: 56.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yabadaba-0.4.0.tar.gz
Algorithm Hash digest
SHA256 28969a221ae11b4abeb089dcc7c32b026ca6812bdbec8f3ad148809235e2444a
MD5 5c1034d47fcbd78aea47c17bcdf95727
BLAKE2b-256 2094c2e615263091a7fd5b29d6bea1d1e7ae88422be434206ad4a7a610262335

See more details on using hashes here.

File details

Details for the file yabadaba-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: yabadaba-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 95.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yabadaba-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c03024f972e27f0e5cd7ae876c06a98370c965d1a7ea885cd595bff962535ad0
MD5 a0d0bdf316f82344d0314cd1db805446
BLAKE2b-256 3c28a9c068807ad50c79110821d9ac575f471f111b2a4c14796efdfd266dfa61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page