bedhost
bedhost is a Python FastAPI module for the API that powers BEDbase
It needs a path to the bedbase configuration file, which can be provided either via -c/--config argument or read from $BEDBASE_CONFIG environment variable.
Running for development
Running with uvicorn provides auto-reload. To configure, this assumes you have previously set up databio/secrets.
- Source
.envfile to populate the environment variables referenced in the configuration file. - Start
bedhostusinguvicornand pass the configuration file via theBEDBASE_CONFIGenv var.
source ../bedbase.org/environment/production.env
BEDBASE_CONFIG=../bedbase.org/config/api.bedbase.org.yaml uvicorn bedhost.main:app --reload
You can change the database you're connecting to by using a different config file:
- Using a local config:
BEDBASE_CONFIG=../bbconf/tests/data/config.yaml uvicorn bedhost.main:app --reload - With new database:
BEDBASE_CONFIG=../bedbase.org/config/bedbase2.yaml uvicorn bedhost.main:app --reload
Now, you can access the service at http://127.0.0.1:8000. Example endpoints:
- 127.0.0.1:8000/bed/78c0e4753d04b238fc07e4ebe5a02984/img/open_chromatin
- 127.0.0.1:8000/bed/78c0e4753d04b238fc07e4ebe5a02984/img_path/open_chromatin
- 127.0.0.1:8000/bed/78c0e4753d04b238fc07e4ebe5a02984/file/bedfile
- 127.0.0.1:8000/bed/78c0e4753d04b238fc07e4ebe5a02984/file_path/bedfile
- 127.0.0.1:8000/bed/78c0e4753d04b238fc07e4ebe5a02984/metadata
- 127.0.0.1:8000/bed/78c0e4753d04b238fc07e4ebe5a02984/metadata?attr_ids=md5sum&attr_ids=genome
Running the server in Docker
Building image
- Primary image:
docker build -t databio/bedhost -f .Dockerfile . - Dev image
docker build -t databio/bedhost:dev -f dev.Dockerfile . - Test image:
docker build -t databio/bedhost:dev -f test.Dockerfile .
Existing images can be found at dockerhub.
Running container for development
Configuration settings and deployment instructions are in the bedbase.org repository.
Metadata
Release files for bedhost 0.2.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 |
|---|---|---|---|---|
| bedhost-0.2.0.tar.gz | 102.0 kB | Without provenance | Details for bedhost-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bedhost-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for bedhost-0.2.0-py3-none-any.whl |
Total release size: 205.7 kB
Release files / bedhost-0.2.0.tar.gz
| Download URL | bedhost-0.2.0.tar.gz |
|---|---|
| Size | 102.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7757e9c9589adc9145aa56522016ee7d45249912df0ba133ece7bae2d7dfa83d
|
|
BLAKE2b-256 checksum How to use checksums |
3fa5eff52f59911b3d6afa3600933a5fd2744e42569f4f390c0a7b7ef6373df5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Release files / bedhost-0.2.0-py3-none-any.whl
| Download URL | bedhost-0.2.0-py3-none-any.whl |
|---|---|
| Size | 103.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30f3d157de1b2ae515bb589652e31b50b6b8db9e3d128a72bd7fd4a2a9d70767
|
|
BLAKE2b-256 checksum How to use checksums |
d9308c46d4628e84e818572f6da5452a49aa740d568e042d31fa8dcea01e077e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Security for bedhost 0.2.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.