Storing a dynamic set of entity attributes in a set of database tables
Project description
AttrTables
AttrTables is a library for creating a system for storing, a dynamic set of attributes for entities in a database.
Basic concepts
Each entity (identified by an unique ID) can have as many attributes as desired. These consist in one or multiple values, each stored in an independent database column. New attributes can be added at any time.
Alongside with the values, attributes can store a computation ID (which can refer to an external table of computation metadata). Computation IDs can be stored for individual attributes and optionally also for groups of attributes.
The attribute columns are automatically spread among multiple database tables, so that the total number of columns does not exceed a given limit.
Setup
The library is based on SqlAlchemy, which must be installed (see
requirements.txt
).
Furthermore, a database must be setup. The connection to the database is done using SqlAlchemy, and the connectable is passed to the library, as explained below.
Running the tests suite
To run the test suite, a database is needed, where the test tables can be stored. The user must create such database.
The database configuration is provided using a YAML configuration file "config.yaml", which shall be stored in the "tests" subdirectory (see as an example "tests/config.yaml").
Usage
The usage of the library is explained in the user manual.
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
Hashes for attrtables-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34ed54a8a2985d764805ae3f6dd9795f90aeaa9fe8296fde3b117ecc55d4ff40 |
|
MD5 | 119fc7b1d70dd583eff19f6e3fe994df |
|
BLAKE2b-256 | 829c01abbd4d4f1b9af804685dff152bdf03c0d7ee03c2c69f67ce9a9ef12f8d |