Two fully functional template apps to demonstrate the usage of the
bfabric-web-apps Python library.
View Demo
·
Report Bug
·
Request Feature
Version Compatibility Notice
To ensure proper functionality, thebfabric_web_appslibrary and thebfabric_web_app_templatemust have the same version.
For example, ifbfabric_web_appsis version0.1.3, thenbfabric_web_app_templatemust also be0.1.3.
Please verify and update the versions accordingly before running the application.
- About The Project
- Quickstart & Deployment
- What Is B-Fabric?
- What Is BfabricPy?
- What Is Dash?
- Roadmap
- Contributing
- License
- Contact
- Acknowledgments
The bfabric_web_app_template serves as an example project built using the bfabric-web-app Python library. These templates demonstrate how to quickly set up web apps that integrate with the B-Fabric Laboratory Information Management System (LIMS). They provide a starting point for developers to build their custom applications.
We offer two templates:
- Basic Template (
basic_index.py): A minimal setup for simple applications.View Demo - Advanced Template (
index.py): A more feature-rich version with additional integrations and functionalities.View Demo
These templates allow developers to choose the level of complexity that best suits their project needs.
- API Connection: Easily connect to B-Fabric using the
bfabric-web-applibrary, including URL parameter handling and authentication management. - Preconfigured Template: Streamlines development with a ready-to-use setup.
- Dash Integration: Includes example layouts and callbacks.
- Logger Example: Demonstrates logging functionality for tracking application events.
- Interactive Sidebar: Features sliders, dropdowns, and inputs for enhanced user interaction.
- Power User Wrapper: Provides additional functionality for power users.
- Sophisticated Layout: Includes a more advanced app specific layout template.
Follow these steps to set up and deploy the B-Fabric Web App Template locally:
-
Fork the repository to your GitHub account.
-
Clone the forked repository to your local machine:
git clone https://github.com/GWCustom/bfabric-web-app-template.git cd bfabric-web-app-template
Choose one of the following options to create and activate a virtual environment:
For Linux/Mac:
python3 -m venv my_app_1
source my_app_1/bin/activateFor Windows:
python -m venv my_app_1
my_app_1\Scripts\activateconda create -n my_app_1 pip
conda activate my_app_1mamba create -n my_app_1 pip
mamba activate my_app_1Once the virtual environment is active, install the required dependencies:
pip install -r requirements.txt4. Set Up .bfabricpy.yml Configuration File as Described in bfabricPy
The .bfabricpy.yml file is essential for the power user configuration. It provides the credentials needed for interacting with the B-Fabric API and is used for functionalities like the logger and API access. Without this file, certain backend features may not work.
Create a .bfabricpy.yml file in your home directory (e.g., ~/.bfabricpy.yml) and format it as follows:
Example .bfabricpy.yml:
GENERAL:
default_config: PRODUCTION
PRODUCTION:
login: your_username
password: your_password
base_url: https://your-bfabric-api-endpointlogin: The B-Fabric user login.password: The corresponding password for the user.base_url: The base API endpoint for your B-Fabric instance.
Ensure the file is saved in the specified path and accessible by the application.
As mentioned above, if you encounter any issues, please refer to the bfabricPy documentation for further guidance.
Start the development server by running:
python3 index.pyVisit the following URL to see your application in action:
http://localhost:8050B-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 Bfabric official website.
BfabricPy is a Python library that provides a programmatic interface to interact with the B-Fabric API. 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 documentation.
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.
See the open issues for a full list of planned features and known issues.
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.
Distributed under the MIT License. See LICENSE for more details.
GWC GmbH - GitHub - LinkedIn
Griffin White - GitHub - LinkedIn
Marc Zuber - GitHub - LinkedIn