{"id":42358628,"url":"https://github.com/ontodev/valve.py","last_synced_at":"2026-01-27T16:38:03.172Z","repository":{"id":39588835,"uuid":"301526790","full_name":"ontodev/valve.py","owner":"ontodev","description":"VALVE in Python","archived":false,"fork":false,"pushed_at":"2023-05-05T17:44:34.000Z","size":180,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-07-04T08:21:47.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ontodev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-05T20:06:28.000Z","updated_at":"2022-10-28T09:37:29.000Z","dependencies_parsed_at":"2023-02-08T19:30:37.128Z","dependency_job_id":null,"html_url":"https://github.com/ontodev/valve.py","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ontodev/valve.py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fvalve.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fvalve.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fvalve.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fvalve.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ontodev","download_url":"https://codeload.github.com/ontodev/valve.py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fvalve.py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28816563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-27T16:38:02.521Z","updated_at":"2026-01-27T16:38:03.166Z","avatar_url":"https://github.com/ontodev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# valve.py\nVALVE bindings for Python\n\n## Install/setup from source\n\n1. Retrieve valve.py from GitHub:\n\n\t    git clone git@github.com:ontodev/valve.py.git\n\t    cd valve.py\n\t    make test\n\n2. Activate the virtual environment:\n\n        source valve.rs/.venv/bin/activate\n\n3. Add the statement\n\n        import ontodev_valve\n\n    to the top of your python script.\n\n## Usage examples\n\nSee the file `test/main.py` for usage examples.\n\n## API reference\n\n### `valve(table_table, db_path, command, verbose, config_table=\"table\")`\n\nGiven a path to a configuration table (either a table.tsv file or a database containing a\ntable named \"table\"), and a directory in which to find/create a database: configure the\ndatabase using the configuration which can be looked up using the table table, and\noptionally create and/or load it according to the value of `command`\n(see [Valve Command](#ValveCommand)). If the `verbose` flag is set to true, output status\nmessages while loading. If `config_table` (which defaults to \"table\") is given and\n`table_table` indicates a database, query the table called `config_table` for the\ntable table information. Returns the configuration map as a String.\n\n### `get_matching_values(config, db_path, table_name, column_name, matching_string)`\n\nGiven 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}, ...]`.\n\n### `validate_row(config, db_path, table_name, row, existing_row, row_number)`\n\nGiven 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.\n\n### `update_row(config, db_path, table_name, row, row_number)`\n\nGiven 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.\n\n### `insert_new_row(config, db_path, table_name, row)`\n\nGiven 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.\n\n### ValveCommand\n\nThe following commands may be used with the valve() function.\n\n#### ValveCommand.Config\n\nConfigure but do not create or load.\n\n#### ValveCommand.Create\n\nConfigure and create but do not load.\n\n#### ValveCommand.Load\n\nConfigure, create, and load.\n\n## Before creating a new release\n\nEdit 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontodev%2Fvalve.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fontodev%2Fvalve.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontodev%2Fvalve.py/lists"}