Skip to main content

evedesign_server

PyPI - Version PyPI - Python Version

Scope

evedesign_server is a lightweight pipeline execution runner and REST API built on top of the evedesign package. It allows to execute design pipelines from a single specification file either locally or through a REST API with additional functions for job status and result retrieval.

Note: job execution from the job queue must be implemented by a custom piece of glue code that retrieves jobs from the queue and submits it to the respective execution environment.

Setup

Python package installation

pip install evedesign_server[api,pipeline]

This installs the full version of the package with all functionality.

  • The api option is required to host the REST API
  • The pipeline option is required to execute design pipelines

You can leave away either option if the functionality is not needed. Installing without options gives a lightweight version of the package for data validation purpose only.

Configuration for API and pipeline runner

Settings are managed with Pydantic Settings in config.py. The following settings need to be defined with environment variables for the REST API and tracking job results during execution (not needed for local execution without job status tracking):

# connection string of PostgreSQL database for tracking job metadata and job queue
DESIGNSERVER_DB_CONNECTION_STRING=postgresql://...

# arbitrary unique name to identify the current worker
DESIGNSERVER_WORKER_NAME=

# S3 bucket for storing input specification and result files
DESIGNSERVER_AWS_ACCESS_KEY_ID=
DESIGNSERVER_AWS_SECRET_ACCESS_KEY=
DESIGNSERVER_AWS_REGION_NAME=
DESIGNSERVER_AWS_S3_BUCKET_NAME=

# supabase URL/public key for user authentication
DESIGNSERVER_SUPABASE_URL=
DESIGNSERVER_SUPABASE_ANON_KEY=

Database setup

Run the following command once to prepare all required database tables (requires DESIGNSERVER_DB_CONNECTION_STRINGto be set, cf. above):

from designserver_api.db.engine import create_all
create_all()

Model files

Model files need to be downloaded once before running any design jobs. Execute the setup command with the Docker container or python -m evedesign_server.backends.generic setup. Model files will be stored to MODEL_PARAM_ROOT (cf. config.py, /models by default, overwrite the environment variable to choose a different directory or bind it to a directory when executing through Docker).

Job execution

Input specification

Depending on job type, instantiate one of the following Pydantic schemas, serialize it to JSON with model_dump() and store it as a file; cf. schemas.py:

  • PipelineSpec
  • SingleMutationScanSpec
  • ProteinToDnaSpec

Running design jobs

Jobs can be executed from the command line either by

  • building the Docker image and running it
  • running python -m evedesign_server.backends.generic

Both receive the same arguments as detailed in the next section.

Execution by job ID

This mode will fetch the input specification JSON file from the S3 bucket (specs/<job_id>) and store the results there as well (results/<job_id). If the database connection string is specified, the job status will be tracked in the database.

run <job_id>

Execution from local file

This mode will execute a local specification file (JSON format) and also store the results locally. If job_id and the database connection string are specified, the job status will be tracked in the database.

run <input_spec_path> <result_file_path> [<job_id>]

License

evedesign_server is released under the MIT license.

Contact

For general questions or inquiries about evedesign please reach out to hello@evedesign.bio.

Metadata

Release files for evedesign_server 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evedesign_server 0.0.1
File Size Uploaded
evedesign_server-0.0.1.tar.gz 35.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evedesign_server 0.0.1
File Interpreter ABI Platform
evedesign_server-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 77.1 kB

Release files / evedesign_server-0.0.1.tar.gz

Download URL evedesign_server-0.0.1.tar.gz
Size 35.7 kB
Tags Source
SHA-256 checksum
How to use checksums
96552f943af221bceb1ff97805e5015b90f1d7093f1bb2ef798b3cc8c2c680b7
BLAKE2b-256 checksum
How to use checksums
1f800fc255122e7afd15e90aa9a0b4e900dc1cb8605fbec81284a9eeb0ab2217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release files / evedesign_server-0.0.1-py3-none-any.whl

Download URL evedesign_server-0.0.1-py3-none-any.whl
Size 41.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4e7626452d89fc8d2eb9f2ea38ce5c6ccdf6b04a9b4676223221638edddf559
BLAKE2b-256 checksum
How to use checksums
38daf81ec485aceb1ae45c9e56ac77e26915886f887a2b26dddd04588c45a78b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page