Geneweaver DB
The Geneweaver DB library provides database access functionality for the Geneweaver project. The library contains SQL queries wrapped in standard python functions, as well as a database connection manager.
Installation
To install the Geneweaver DB library, run one of the following commands:
Using Pip
pip install geneweaver-db
Using Poetry
poetry add geneweaver-db
Usage
The Geneweaver DB library is intended to be used as a dependency for other Geneweaver packages, but can also be used as a stand-alone pacakge.
The package has three main sections:
geneweaver.db- contains non-async database functions.geneweaver.db.aio- contains async database functions.geneweaver.db.query- contains SQL queries and SQL generation functions.
Database functions usually take a Cursor or AsyncCursor object as their first
argument.
Non-Async Functions
import psycopg
import geneweaver
from geneweaver.db.core.settings import settings
def get_my_gene():
with psycopg.connect(settings.URI) as conn:
with conn.cursor() as cur:
result = geneweaver.db.gene.get(cur, 'my_gene')
return result
Async Functions
import psycopg
import geneweaver
from geneweaver.db.core.settings import settings
async def get_my_gene():
async with psycopg.AsyncConnection.connect(settings.URI) as conn:
async with conn.cursor() as cur:
result = await geneweaver.db.aio.gene.get(cur, 'my_gene')
return result
Metadata
Release files for geneweaver-db 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| geneweaver_db-0.5.0.tar.gz | 34.4 kB | Without provenance | Details for geneweaver_db-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| geneweaver_db-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for geneweaver_db-0.5.0-py3-none-any.whl |
Total release size: 87.5 kB
Release files / geneweaver_db-0.5.0.tar.gz
| Download URL | geneweaver_db-0.5.0.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
170ee8fdc7efe5f3a6989014db0b6e2c02d9da3ff8b085ca218168f3cfcc8d21
|
|
BLAKE2b-256 checksum How to use checksums |
4a2214e4f1d353b0a288eb928081ac6981e57067f5d3b2c6329194dab16d7c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.9.20 Linux/6.8.0-1014-azure
|
Release files / geneweaver_db-0.5.0-py3-none-any.whl
| Download URL | geneweaver_db-0.5.0-py3-none-any.whl |
|---|---|
| Size | 53.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bb40b7a50783a48092ddf6529aca70c49bfb69da6e52420076cc300769db297
|
|
BLAKE2b-256 checksum How to use checksums |
1db4a4b5dce17f225c64f6309a038627848c5593a294a90c4a846728b581436f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.9.20 Linux/6.8.0-1014-azure
|
Security for geneweaver-db 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.