VALVE bindings for Python
Project description
valve.py
VALVE bindings for Python
Install/setup from source
-
Retrieve valve.py from GitHub:
git clone git@github.com:ontodev/valve.py.git cd valve.py make test
-
Activate the virtual environment:
source valve.rs/.venv/bin/activate
-
Add the statement
import ontodev_valve
to the top of your python script.
Usage examples
See the file test/main.py
for usage examples.
API reference
configure_and_or_load(table_table, db_path, load, verbose)
Given a path to a table table file (table.tsv), a directory in which to find/create a database: configure the database using the configuration which can be looked up using the table table, and optionally load it if the load
flag is set to true. If the verbose
flag is also set to true, output progress messages while loading.
Returns the configuration map back as a JSON string.
get_matching_values(config, db_path, table_name, column_name, matching_string)
Given a config map represented as a JSON string, a directory containing the database, the table name and column name from which to retrieve matching values, return a JSON array (represented as a string) of possible valid values for the given column which contain the matching string (optional) as a substring (or all of them if no matching string is given). The JSON array returned is formatted for Typeahead, i.e., it takes the form: [{"id": id, "label": label, "order": order}, ...]
.
validate_row(config, db_path, table_name, row, existing_row, row_number)
Given a config map represented as a JSON string, a directory in which to find the database, a table name, a row, and if the row already exists in the database, its associated row number (optional), perform both intra- and inter-row validation and return the validated row as a JSON string.
update_row(config, db_path, table_name, row, row_number)
Given a config map represented as a JSON string, a directory in which the database is located, a table name, a row represented as a JSON string, and its associated row number, update the row in the database.
insert_new_row(config, db_path, table_name, row)
Given a config map represented as a JSON string, a directory in which the database is located, a table name, and a row represented as a JSON string, insert the new row to the database.
Before creating a new release
Edit the file VALVE.VERSION
and adjust the version of valve.py (and, if necessary, valve.rs). After pushing your commit, create a new release in GitHub with the new version number as the release name and tag.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for ontodev_valve-0.1.15-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86dfdfb276c51bb41a0a9a9ab344a9645aa987238c18907e07e654d703d9e81d |
|
MD5 | 2a9d6faf507c13bb95ffb77c13fa1ccf |
|
BLAKE2b-256 | d170b809cc1181f4cd635bd3a860f4afe58ad606beedf5e001cfcdf3843c53da |
Hashes for ontodev_valve-0.1.15-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df800f4d738c0e257fe3b6ec15f8639e65b07eded4126a245700c424cf24b7e4 |
|
MD5 | 964a64063f15ba1322f41c4c6ea0f270 |
|
BLAKE2b-256 | aba71958b69967270129ea330fd520cf5961bd4d0c3e61127169042073055731 |
Hashes for ontodev_valve-0.1.15-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2aca61271007413d516ad453aea44f05772beb826744286b56242569e68f538 |
|
MD5 | 9c2741f68171ecc405bc8e7c0e3b4996 |
|
BLAKE2b-256 | 8bcd0825efb825bb2f913c1105da75fcafc302ae867edeb2209d610a86ed3525 |
Hashes for ontodev_valve-0.1.15-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c784cce0fa8ffa6c7a2ab0cd1d7c46fde234852b8625a940666ce298cc57662c |
|
MD5 | 42f8b415c2f8a4a4fa614ab11dd24e41 |
|
BLAKE2b-256 | 162a14e0b5206e96f787117af09a7138e5a5f51ca15da9da53fa0329fa7dbcdc |
Hashes for ontodev_valve-0.1.15-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7235cc254f4f08b4e33d7855645023f85fa109d67ecc76f5d2b03e5209cea08 |
|
MD5 | 92be05326a3ee8865dc6bd1bf88ae256 |
|
BLAKE2b-256 | 66d1eca245b52ab7c95bf11d642fcd44c6a955d99950903dbfed7910a1b95784 |
Hashes for ontodev_valve-0.1.15-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81870d7563da623cf7af073c650d8a8f70e9e3a1118e463b900fdae896d818a1 |
|
MD5 | 817466e8ec2581b12423e424b46dfc6c |
|
BLAKE2b-256 | 850de1bd96d425dfcdaeaa244b6c0c38f78cc7f8929eecdcef75fb2dc7464f41 |
Hashes for ontodev_valve-0.1.15-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3262883899a3947af7177803df5bbdf4e04f349da32e551e050790d837bf018b |
|
MD5 | abd77de0e042bce68a190beea8896ffb |
|
BLAKE2b-256 | 790fcf63c285cdd768a737735028f0b54cc68e1acfdfb957c76f1ef1b1c079d9 |
Hashes for ontodev_valve-0.1.15-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9b1a8cc1d7fc16200ff61dd8f4e7ff0ac0dd8be08015f0ba38915dac17781f9 |
|
MD5 | b8cd50b18beb84b4511f8537a91e37f0 |
|
BLAKE2b-256 | 1a0e9be376877e95d01ea02797583da37a284c3628c189902231f5a3020fbc5a |
Hashes for ontodev_valve-0.1.15-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e24c96d03e4881d9d07b9c0f128a3bcc86a5754482f3a8be5bf73f1cac6b70 |
|
MD5 | 21a3e98f178582f7109ba4fa1cee8a3a |
|
BLAKE2b-256 | f019173db6cfa736c21eb7726a6ba85b2ba964fc8079802410bdcbaf7a4f1fa8 |
Hashes for ontodev_valve-0.1.15-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9983cd6e5a22eead09bdb2d5109484eb3647f5cfe5685d411c62e6b07806ce42 |
|
MD5 | e2ee2d5ed4f0665146194d90376de696 |
|
BLAKE2b-256 | eb2b2707345ad81dde8596dba52bed7f859e99f57839ba28b907ee94c1a04cbf |
Hashes for ontodev_valve-0.1.15-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e917f76c277fb0568ef2d75e56411d748eaebb936f02e95bba2f14d2a5148c86 |
|
MD5 | e8f7a3a957b22000db81f322cb041e58 |
|
BLAKE2b-256 | bd439b9fc51cb15aed8f076bd689571b378c35825230a8f2d6574963f3a054e9 |
Hashes for ontodev_valve-0.1.15-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0589953f5d96bc4fa2b9b95d6b73d9d988906769cafc24fdbd50863d54f25f07 |
|
MD5 | 27a761f2f5cf608ed941139a0aef3ef3 |
|
BLAKE2b-256 | 069cfffd7d12c043f0d8ca28b68445677bff2b8d1fcdf9821b30414796f92732 |
Hashes for ontodev_valve-0.1.15-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b40fbe2bf3a02047b83243dd9b609dcc1f6ad6c88100dfd12cdff199e6124c2 |
|
MD5 | 56ac758a7622f9b840367e8a0c4c4d15 |
|
BLAKE2b-256 | 710ac058a989aa6cf4fd757d40413c9a9887911036814d48e4cb633325b4daa6 |
Hashes for ontodev_valve-0.1.15-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b26cefac7544984b6d8c4afccfbbc62212345d31ce2ab87c7f14305e53f949b9 |
|
MD5 | 676ae77be94e631cc41c57d55147c0da |
|
BLAKE2b-256 | e3d7d1be0d4a086f04105af640542b667cc94d8b0eefe05e95da4e6d24bfa8cd |
Hashes for ontodev_valve-0.1.15-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f39f11c6c296469bd1fa5b1fce06dc916f8260e4dd43b1ab1d756c7373820113 |
|
MD5 | 5148559a0235607ee63570115fb11821 |
|
BLAKE2b-256 | 382e671ed4a611ea6f84ba08df51424ed36fec249ac60e1382af1eeb7310a21a |