A Python client for interacting with the Bioprocess Intelligence platform
Project description
Bioprocess Intelligence Python Client
This is the official Python client for interacting with Bioprocess Intelligence – a comprehensive platform for digital bioprocess development and operation.
The client provides programmatic access to the Bioprocess Intelligence API, enabling users to integrate, manage, and analyze bioprocess data. It supports common operations such as managing teams, collections, and processes, and importing structured data from various formats.
As the platform evolves, the client will be extended to cover additional capabilities including real-time data integration, statistical analysis, mechanistic modeling, and more.
Features
- Authenticate using environment variables.
- List teams and collections.
- Create, retrieve, update, and delete processes.
- Import process data from YAML content.
- Monitor background tasks.
Installation
pip install bioprocess-intelligence
Getting Started
- Create a
.envfile in your project root:
BPI_API_URL=https://your-api-url
BPI_USERNAME=your_username
BPI_PASSWORD=your_password
- Use the following boilerplate code to initialize the client:
from bioprocess_intelligence.client import BioprocessIntelligenceClient
import os
from dotenv import load_dotenv
from pathlib import Path
load_dotenv(Path(__file__).parent / ".env")
client = BioprocessIntelligenceClient(
api_url=os.getenv("BPI_API_URL"),
username=os.getenv("BPI_USERNAME"),
password=os.getenv("BPI_PASSWORD")
)
Example Usage
List Teams
teams = client.list_teams()
print("Teams:", teams)
Get Collections in a Team
collections = client.list_collections(team_id=5)
Get or Create a Process
try:
process = client.get_process(name="New process", collection_id=123)
except:
process = client.create_process(
name="New process",
collection_id=123
)
Update a Process
process = client.update_process(
process_id=process['id'],
name="Updated name",
description="Updated description",
start_time="2024-01-01T10:00:00+01:00",
end_time="2024-01-07T15:00:00+01:00"
)
Delete a Process
client.delete_process(process['id'])
Importing Process Data
From YAML Content
from pathlib import Path
script_dir = Path(__file__).parent
yaml_file = script_dir / "files/process_import_template_v1.yaml"
try:
content = yaml_file.read_text(encoding="utf-8")
result = client.import_process_from_yaml(
collection_id=123,
content=content,
timezone="UTC"
)
print("Import result:", result)
client.monitor_background_task(result["backgroundTaskId"])
except Exception as e:
print(f"Error importing process from YAML: {e}")
This allows you to send the full YAML string directly to the API, without using file uploads.
Error Handling
Make sure to wrap API calls in try-except blocks to handle errors gracefully, especially when importing data or querying resources.
License
This client is proprietary software distributed in binary form.
- Free for academic and non-commercial research use
- A commercial license is required for any commercial or for-profit use
To request a commercial license, please contact us at support@wisdomengine.de.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bioprocess_intelligence-0.1.7-py3-none-any.whl.
File metadata
- Download URL: bioprocess_intelligence-0.1.7-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
552bc1ef8989fbf65d5d2cd4ac08cdb258e903697b800ba7ffdc279a70f8c58d
|
|
| MD5 |
43729bd1fd40e47c5da8613b66c36847
|
|
| BLAKE2b-256 |
874216d47ddecf6d1a1a3b010077a32484c178701183388c91025b0352863133
|
Provenance
The following attestation bundles were made for bioprocess_intelligence-0.1.7-py3-none-any.whl:
Publisher:
publish.yml on wisdomengine-gmbh/bioprocess-intelligence-python-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioprocess_intelligence-0.1.7-py3-none-any.whl -
Subject digest:
552bc1ef8989fbf65d5d2cd4ac08cdb258e903697b800ba7ffdc279a70f8c58d - Sigstore transparency entry: 262909426
- Sigstore integration time:
-
Permalink:
wisdomengine-gmbh/bioprocess-intelligence-python-client@e7c31f01e27c7fcddbff0164d598e7e0966c3755 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/wisdomengine-gmbh
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e7c31f01e27c7fcddbff0164d598e7e0966c3755 -
Trigger Event:
release
-
Statement type: