{"id":19388841,"url":"https://github.com/linkml/linkml-dataops","last_synced_at":"2026-06-11T20:25:50.392Z","repository":{"id":45071200,"uuid":"408611465","full_name":"linkml/linkml-dataops","owner":"linkml","description":"Data API for LinkML instance data","archived":false,"fork":false,"pushed_at":"2024-02-27T01:43:27.000Z","size":128,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-10-26T16:40:20.443Z","etag":null,"topics":["api","change-objects","data-modeling","database","linkml","python","query-language"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-20T21:56:12.000Z","updated_at":"2025-03-27T17:28:49.000Z","dependencies_parsed_at":"2024-06-23T06:03:27.337Z","dependency_job_id":null,"html_url":"https://github.com/linkml/linkml-dataops","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.2272727272727273,"last_synced_commit":"7b06587dd339705e8f7a6ade2b62ea9753ebd28a"},"previous_names":["linkml/linkml-runtime-api"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/linkml/linkml-dataops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-dataops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-dataops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-dataops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-dataops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkml","download_url":"https://codeload.github.com/linkml/linkml-dataops/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkml%2Flinkml-dataops/sbom","scorecard":{"id":591048,"data":{"date":"2025-08-11","repo":{"name":"github.com/linkml/linkml-dataops","commit":"cc3557d050b23d6f03a8ab010539125415b9ae57"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yaml:1","Warn: no topLevel permission defined: .github/workflows/pr-test.yaml:1","Warn: no topLevel permission defined: .github/workflows/pypi-publish.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/main.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/main.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yaml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/main.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yaml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/main.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-test.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/pr-test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr-test.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/pr-test.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-test.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/pr-test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-publish.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/pypi-publish.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-publish.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/pypi-publish.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi-publish.yaml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/linkml/linkml-dataops/pypi-publish.yaml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yaml:25","Warn: pipCommand not pinned by hash: .github/workflows/main.yaml:26","Warn: pipCommand not pinned by hash: .github/workflows/main.yaml:46","Warn: pipCommand not pinned by hash: .github/workflows/main.yaml:47","Warn: pipCommand not pinned by hash: .github/workflows/main.yaml:61","Warn: pipCommand not pinned by hash: .github/workflows/pypi-publish.yaml:22","Warn: pipCommand not pinned by hash: .github/workflows/pypi-publish.yaml:23","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   7 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2019-217 / GHSA-462w-v97r-4m45","Warn: Project is vulnerable to: PYSEC-2014-8 / GHSA-8r7q-cvjq-x353","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: PYSEC-2014-82 / GHSA-fqh9-2qgg-h84h","Warn: Project is vulnerable to: PYSEC-2021-66 / GHSA-g3rq-g295-4j3m","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: PYSEC-2019-220 / GHSA-hj2j-77xm-mc5v","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T21:53:43.378Z","repository_id":45071200,"created_at":"2025-08-20T21:53:43.378Z","updated_at":"2025-08-20T21:53:43.378Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34217312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","change-objects","data-modeling","database","linkml","python","query-language"],"created_at":"2024-11-10T10:13:51.337Z","updated_at":"2026-06-11T20:25:50.353Z","avatar_url":"https://github.com/linkml.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linkml-dataops\n\nAn extension to linkml-runtime to provide an API over runtime data objects.\n\nThis provides data models for CRUD (Create, Read, Update, Delete) objects, i.e.\n\n* Representations of *queries* over objects that instantiate linkml classes\n* Representations of *changes/patches* that apply changes to objects that instantiate linkml classes\n\nAdditionally this provides hooks to allow both sets of operations over different *engines*\n\nCurrent engines implemented here:\n\n* in-memory object tree engine\n* json-patcher engine\n\nOther engines may be implemented elsewhere - e.g. linkml-solr\n\nSee [tests/](https://github.com/linkml/linkml-dataops/tree/main/tests) for examples\n\n## Changes Datamodel\n\nSee linkml_dataops.changes\n\nChange classes include:\n\n* AddObject\n* RemoveObject\n* Append to a list of values  \n* Rename (i.e. change the value of an identifier)\n\nThe ObjectChanger class provides an engine for applying generic changes to\nlinkml object trees loaded into memory.\n\nExample:\n\n```python\n# your datamodel here:\nfrom personinfo import Dataset, Person, FamilialRelationship\n\n# setup - load schema\nschemaview = SchemaView('kitchen_sink.yaml')\n\ndataset = yaml_loader.load('my_dataset.yaml', target_class=Dataset)\n\n# first create classes using your normal LinkML datamodel\nperson = Person(id='P:222',\n                name='foo',\n                has_familial_relationships=[FamilialRelationship(related_to='P:001',\n                                                                 type='SIBLING_OF')])\n\nchanger = ObjectChanger(schemaview=schemaview)\nchange = AddObject(value=person)\nchanger.apply(change, dataset)\n```\n\nCurrently there are two changer implementations:\n\n* ObjectChanger\n* JsonPatchChanger\n\nBoth operate on in-memory object trees. JsonPatchChanger uses JsonPatch objects as intermediates: these can be exposed and used on your source data documents in JSON\n\nIn future there will be other datastores\n\n## Query Datamodel\n\nSee linkml_dataops.query\n\nThe main query class is `FetchQuery`\n\nObjectQueryEngine provides an engine for executing generic queries on in-memory object trees\n\nExample:\n\n```python\n# your datamodel here:\nfrom kitchen_sink import Dataset, Person, FamilialRelationship\n\n# setup - load schema\nschemaview = SchemaView('kitchen_sink.yaml')\n\ndataset = yaml_loader.load('my_dataset.yaml', target_class=Dataset)\n\n\nq = FetchQuery(target_class=Person.class_name,\n                       constraints=[MatchConstraint(op='=',\n                                                    left='has_medical_history/*/diagnosis/name',\n                                                    right='headache')])\nqe = ObjectQueryEngine(schemaview=schemaview)\npersons = qe.fetch(q, dataset)\nfor person in persons:\n  print(f'{person.id} {person.name}')\n```\n\nCurrently there is only one Query api implemntation\n\n* ObjectQuery\n\nThis operates on in-memory object trees.\n\nIn future there will be other datastores implemented (Solr, SQL, SPARQL, ...)\n\n## Generating a Domain CRUD Datamodel\n\nThe above examples use *generic* CRUD datamodels that can be used with any data models. You can also generate *specific CRUD datamodels* for your main domain datamodel.\n\n```bash\ngen-crud-datamodel kitchen_sink.yaml \u003e kitchen_sink_crud.yaml\n```\n\nThis will generate a LinkML database that represents CRUD operations on your schema\n\n```yaml\n  PersonQuery:\n    description: A query object for instances of Person from a database\n    comments:\n    - This is an autogenerated class\n    mixins: LocalQuery\n    slots:\n    - constraints\n  AddPerson:\n    description: A change action that adds a Person to a database\n    comments:\n    - This is an autogenerated class\n    mixins: LocalChange\n    slot_usage:\n      value:\n        range: Person\n        inlined: true\n  RemovePerson:\n    description: A change action that remoaves a Person to a database\n    comments:\n    - This is an autogenerated class\n    mixins: LocalChange\n    slot_usage:\n      value:\n        range: Person\n        inlined: true\n```\n\n\n\n\n## Generating Python\n\n```\ngen-python-api kitchen_sink.yaml \u003e kitchen_sink_api.py\n```\n\nThis will generate a query API:\n\n```python\n    # --\n    # Person methods\n    # --\n    def fetch_Person(self, id_value: str) -\u003e Person:\n        \"\"\"\n        Retrieves an instance of `Person` via a primary key\n\n        :param id_value:\n        :return: Person with matching ID\n        \"\"\"\n        ...\n\n    def query_Person(self,\n             has_employment_history: Union[str, MatchExpression] = None,\n             has_familial_relationships: Union[str, MatchExpression] = None,\n             has_medical_history: Union[str, MatchExpression] = None,\n             age_in_years: Union[str, MatchExpression] = None,\n             addresses: Union[str, MatchExpression] = None,\n             has_birth_event: Union[str, MatchExpression] = None,\n             metadata: Union[str, MatchExpression] = None,\n             aliases: Union[str, MatchExpression] = None,\n             id: Union[str, MatchExpression] = None,\n             name: Union[str, MatchExpression] = None,\n             \n             _extra: Any = None) -\u003e List[Person]:\n        \"\"\"\n        ...\n        \"\"\"\n        ...\n```             \n\nIn future, change APIs will also be generated\n\nThe API is neutral with respect to the underlying datastore - each method is a wrapper for the generic runtime API\n\n```python\n\n# create query engine object\nschemaview = SchemaView(MY_SCHEMA)\nmy_data = json_loader.load(MY_DATA, target_class=...)\nengine = ObjectQueryEngine(schemaview=schemaview,\n                           database=Database(my_data))\n\n# create an API instance\nks_api = KitchenSinkAPI(engine)\n\n# API calls below\n...\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkml%2Flinkml-dataops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkml%2Flinkml-dataops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkml%2Flinkml-dataops/lists"}