{"id":30063619,"url":"https://github.com/thejacksonlaboratory/geneweaver-db","last_synced_at":"2025-08-08T04:46:30.140Z","repository":{"id":234494447,"uuid":"718164567","full_name":"TheJacksonLaboratory/geneweaver-db","owner":"TheJacksonLaboratory","description":"The GeneWeaver database interaction code.","archived":false,"fork":false,"pushed_at":"2024-05-28T16:26:28.000Z","size":423,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-29T07:36:00.678Z","etag":null,"topics":["functional-genomics","geneweaver","genomic-data-science","genomics","sql"],"latest_commit_sha":null,"homepage":"https://geneweaver.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheJacksonLaboratory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2023-11-13T14:15:57.000Z","updated_at":"2024-05-30T22:32:32.264Z","dependencies_parsed_at":"2024-05-30T22:32:26.163Z","dependency_job_id":null,"html_url":"https://github.com/TheJacksonLaboratory/geneweaver-db","commit_stats":null,"previous_names":["thejacksonlaboratory/geneweaver-db"],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/TheJacksonLaboratory/geneweaver-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheJacksonLaboratory%2Fgeneweaver-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheJacksonLaboratory%2Fgeneweaver-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheJacksonLaboratory%2Fgeneweaver-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheJacksonLaboratory%2Fgeneweaver-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheJacksonLaboratory","download_url":"https://codeload.github.com/TheJacksonLaboratory/geneweaver-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheJacksonLaboratory%2Fgeneweaver-db/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269366699,"owners_count":24405239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":["functional-genomics","geneweaver","genomic-data-science","genomics","sql"],"created_at":"2025-08-08T04:46:01.569Z","updated_at":"2025-08-08T04:46:30.124Z","avatar_url":"https://github.com/TheJacksonLaboratory.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geneweaver DB\n\n[![Tests](https://github.com/TheJacksonLaboratory/geneweaver-db/actions/workflows/tests.yml/badge.svg?event=push)](https://github.com/TheJacksonLaboratory/geneweaver-db/actions/workflows/tests.yml)\n[![Style](https://github.com/TheJacksonLaboratory/geneweaver-db/actions/workflows/style.yml/badge.svg?event=push)](https://github.com/TheJacksonLaboratory/geneweaver-db/actions/workflows/style.yml)\n[![Coverage](https://github.com/TheJacksonLaboratory/geneweaver-db/actions/workflows/coverage.yml/badge.svg?event=push)](https://github.com/TheJacksonLaboratory/geneweaver-db/actions/workflows/coverage.yml)\n\nThe Geneweaver DB library provides database access functionality for the Geneweaver \nproject. The library contains SQL queries wrapped in standard python functions, as well\nas a database connection manager.\n\n\n## Installation\n\nTo install the Geneweaver DB library, run one of the following commands:\n\n#### Using Pip\n```\npip install geneweaver-db\n```\n\n#### Using Poetry\n```\npoetry add geneweaver-db\n```\n\n## Usage\nThe Geneweaver DB library is intended to be used as a dependency for other Geneweaver\npackages, but can also be used as a stand-alone pacakge.\n\nThe package has three main sections:\n- `geneweaver.db` - contains non-async database functions.\n- `geneweaver.db.aio` - contains async database functions.\n- `geneweaver.db.query` - contains SQL queries and SQL generation functions.\n\nDatabase functions _usually_ take a `Cursor` or `AsyncCursor` object as their first\nargument.\n\n### Non-Async Functions\n```python\nimport psycopg\nimport geneweaver\nfrom geneweaver.db.core.settings import settings\n\ndef get_my_gene():\n    with psycopg.connect(settings.URI) as conn:\n            with conn.cursor() as cur:\n                result = geneweaver.db.gene.get(cur, 'my_gene')\n    return result\n```\n\n### Async Functions\n```python\nimport psycopg\nimport geneweaver\nfrom geneweaver.db.core.settings import settings\n\nasync def get_my_gene():\n    async with psycopg.AsyncConnection.connect(settings.URI) as conn:\n            async with conn.cursor() as cur:\n                result = await geneweaver.db.aio.gene.get(cur, 'my_gene')\n    return result\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthejacksonlaboratory%2Fgeneweaver-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthejacksonlaboratory%2Fgeneweaver-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthejacksonlaboratory%2Fgeneweaver-db/lists"}