B-Fabric Web Apps
A Python-based library designed for the development and integration of satellite applications with the B-Fabric Laboratory Information Management System (LIMS).
Explore the documentation »
View Demo
Table of Contents
- About The Project
- Quickstart
- What Is B-Fabric?
- What Is B-FabricPy?
- What Is Dash?
- Roadmap
- Contributing
- License
- Contact
- Acknowledgments
About The Project
The bfabric_web_apps is a Python library designed to simplify the creation of web applications that interact with B-Fabric. The library streamlines the development of B-Fabric satellite applications by standardizing common patterns and providing developers with a simpler and more efficient code base. B-Fabric Web Apps are modular satellite applications that extend the functionality of the B-Fabric Laboratory Information Management System (LIMS).
Key Features
- Token Management – Securely handle authentication tokens for API access.
- Entity Data Handling – Retrieve, modify, and update B-Fabric entities dynamically.
- Logger – Integrated logging for API calls, events, and errors.
- Layouts and UI Components – Utilize predefined structures to streamline app design.
- B-Fabric Shell & Design System –
get_static_layoutwraps your app in a B-Fabric–styled shell: an app bar (with a link to the logged-in user's profile), an entity row that links back to the originating entity, an environment badge (TEST / PROD), a tab bar, and reusable.bf-*CSS building blocks for a consistent look.
Built With
Quickstart
You can install the bfabric_web_apps module via pip:
pip install bfabric_web_apps
Basic Usage Example
After installation, you can create a simple Dash-based web application using bfabric_web_apps like this:
# Import necessary modules
from dash import html
from bfabric_web_apps import(
create_app,
get_static_layout,
HOST,
PORT,
)
# Initialize the Dash application
app = create_app()
# Define application title
app_title = "My B-Fabric App"
# Define the main layout content
app_specific_layout = html.Div([
html.H1("Welcome to My B-Fabric App"),
html.P("This is a quickstart example using bfabric_web_apps.")
])
# Optionally define documentation content
documentation_content = [
html.H2("Documentation"),
html.P("Describe your app's features here.")
]
# Set up the application layout
app.layout = get_static_layout(
app_title, # Title shown in the browser tab
app_specific_layout, # Main application content
documentation_content # Documentation section
)
# Run the application
if __name__ == "__main__":
app.run(debug=False, port=PORT, host=HOST)
This example sets up a minimal web application using bfabric_web_apps. get_static_layout renders the B-Fabric–styled shell (app bar, entity row, environment badge, and tab bar) around your app_specific_layout, so the app matches the B-Fabric look out of the box.
Running Your Application
After creating your Dash app, you have several options to run it:
Development Mode (Flask Dev Server)
For development with auto-reload:
python your_app.py
Or using the CLI tool:
bfabric-webapp run your_app:app.server --dev
Production Mode (Gunicorn)
For production deployments, the library includes Gunicorn as a dependency and provides a gunicorn.conf.py configuration file that automatically reads settings from your .env file (HOST, PORT, etc.).
Using the CLI tool (recommended):
bfabric-webapp run your_app:app.server
The CLI automatically detects your environment:
- If
DEBUG=Truein.env: Uses Flask dev server - If
DEBUG=Falsein.env: Uses Gunicorn for production - Use
--devflag to force development mode - Use
--prodflag to force production mode
Using Gunicorn directly:
gunicorn 'your_app:app.server' -c gunicorn.conf.py
Or with uv:
uv run gunicorn 'your_app:app.server' -c gunicorn.conf.py
The gunicorn configuration automatically uses your .env settings for HOST, PORT, and other server options.
URL Path Prefix: To run the app under a subpath (e.g., /myapp/), set SCRIPT_NAME=/myapp in your .env file.
Example Usage and Template Overview
To explore the usage of the bfabric_web_apps library in greater detail, refer to the bfabric-web-app-template repository. This template demonstrates how to:
- Set up a project using
bfabric_web_apps. - Create visual dashboards with Dash.
- Interact with the B-Fabric LIMS through the Python library.
What Is B-Fabric?
B-Fabric is a Laboratory Information Management System (LIMS) used for managing scientific experiments and their associated data in laboratories. It provides a platform for tracking samples, analyzing results, and organizing workflows efficiently.
For more details, visit the B-Fabric official website.
What Is BfabricPy?
BfabricPy is a Python library that provides a programmatic interface to interact with the Bfabric SOAP WebService. It allows developers to integrate B-Fabric functionalities into custom Python applications. This library simplifies tasks like querying samples, uploading results, and interacting with the LIMS programmatically.
BfabricPy is a dependency of this project and is fetched directly from its GitHub repository during installation.
For more details, visit the bfabricPy official Git repository or the library's official documentation.
What Is Dash?
Dash is a Python framework for building interactive web applications. It combines the power of Plotly for data visualization and Flask for backend support, making it ideal for scientific and analytical dashboards.
For more details, visit the Dash official documentation.
Roadmap
Contact the development team for planned features and known issues.
Contributing
bfabric_web_apps is an open-source project, and therefore any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Make your changes and commit them:
git commit -m "Add feature: YourFeature"
- Push to your branch:
git push origin feature/YourFeature
- Open a Pull Request.
Top contributors:
Contact the development team for contributor information.
License
Distributed under the MIT License. See LICENSE file for more details.
Contact
GWC GmbH - LinkedIn Griffin White - LinkedIn Marc Zuber - LinkedIn
Acknowledgments
Release files for bfabric-web-apps 0.9.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bfabric_web_apps-0.9.7.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bfabric_web_apps-0.9.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / bfabric_web_apps-0.9.7.tar.gz
| Download URL | bfabric_web_apps-0.9.7.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd33cb985c607a33a1f04124f2b543905480b693a635b976bbd9dcca3f48f974
|
|
BLAKE2b-256 checksum How to use checksums |
9e1e470b83b24261ebe0e62405a302cbfaf58bbaa95e187ca39ebd17b5919972
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / bfabric_web_apps-0.9.7-py3-none-any.whl
| Download URL | bfabric_web_apps-0.9.7-py3-none-any.whl |
|---|---|
| Size | 81.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b735fd3cab2ed797f49ccc9e4a2930417eec42082771d4ea7d14a31f313a7393
|
|
BLAKE2b-256 checksum How to use checksums |
c858e81879c46cd6300709c7273db49522443ab7c60de3b62c62aa10141f3ba8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|