A free and open-source LIMS software with scriptable modules.
Project description
Virtual Interface for Production & Experimental Research
Easy | Modular | Lightweight
A simple, highly scalable & adaptable LIMS system for rapidly evolving laboratory teams.
Features
- Customisable clientside: Build your own VIPER modules in Python and help from Boa Constructor
- Boa Constructor: Make new HTML-Javascript-Python front-end modules with simple drag and drop
- Client Scripting: Beginner friendly code with complete control for advanced programmers
- Client Commands: Scriptable client to server requests passed through Server Strategies
- Server Strategies: Programmable permission authenticated serverside functions
- Security: OAuth2 user verification and encrypted HTTP requests
- SQL: Intrinsic support for MySQL, PostgreSQL and SQLite
- OAuth2: Intrinsic support for Github and LinkedIn OAuth2 Apps
The Vision
- Lightweight plug-and-play framework
- Power for beginner programmers
- Freedom for advanced programmers
- Competency based permissions
Installation
Operating System terminal:
pip install VIPER_LIMS
Python terminal or script:
import VIPER_LIMS
VIPER_LIMS.Deploy_VIPER()
Alternatively: download this repository and run VIPER_LIMS/VIPER_Installer.py
Deploy Server
Store the VIPER_Server will need: information from the SQL Database and OAuth 2.0 Service sections below
Run the following command and provide the requested information:
VIPER_LIMS.Deploy_VIPER("Server")
Server IP Address:
Before you start you should know the local IP of your VIPER_Server.
Use ipconfig
on Windows or ifconfig
on Unix based systems and get your IPV4 local IP address (usually 192.168.X.X)
If you do not intend to host your VIPER_Server online then your VIPER_Server IP Address will be this local IP
If you want your VIPER_Server to be accessible through the internet you need to Port Forward TCP 8000 on your router to the local IP of your VIPER_Server
Afterwards use your public IP Address
You will use this IP address for the OAuth2 service callback URL. If your IP Address changes you must update the callback URL.
SQL Database
The database which your LIMS requests will access.
MySQL is recommended but PostgreSQL or SQLite should be compatible
The VIPER_Server will need:
- Username
- Password
- IP Address of SQL Server
- Port of SQL Server (default is 3306 for MySQL)
OAuth 2.0 Service
The service which hosts your users accounts, pick ONE:
- LinkedIn OAuth2
- Github OAuth2
- Other available services which require manual configuration
- Further reading if you want to set up your own
The VIPER_Server will need:
- Client ID
- Client Secret
- Callback URL
Deploy Client
VIPER_LIMS.Deploy_VIPER("Client")
- Paste the desired deployment folder directory
- Paste the VIPER_Server SDump (or "none" if you do not have one yet)
- To connect to a new Server go to Settings_Panel -> Local_Settings, then Paste an SDump -> Click Autosetup SDump
- Type off or on and click Set ServerURL to disable or enable online mode
To Logout go to Settings_Panel/Logout AND Logout of your OAuth2 Service Client Tour Tutorial
Applications
Boa Constructor
Build your own modules: Boa Constructor Tutorial
Highly modular, simple, completely customisable scripts for rapidly evolving teams
- Launch the Client
- Assemble an HTML page using Boa Constructor
- See Coding a Module_Script.py
- Activate your module in Settings_Panel/Module_Toggler
- Restart VIPER_Client
Coding a Module_Script.py:
Expired_Ethanol_List = LIMSQuery(False, "Reagents", ["Ethanol","Expired"], "fetchall_criteria")) #Access the LIMS SQL Database
Which could execute the following on the server through a fetchall_criteria Strategy:
```sql
SELECT * FROM Ethanol WHERE Expired = True
In this example we are fetching all Expired Reagents:
LIMSQuery(
False: Initiates LIMSQuery's Third Party App support,
Database: The database within which to execute the SQL process,
Command: The data necessary to perform the request,
Strategy: The VIPER_Server strategy through which the Command will be processed,
)
#Example Boa Constructed module script:
def Process_User_Request(request): #Runs when the user clicks a button on your Boa Constructed VIPER Module
try:
ButtonPressed = request.form['SubmitButtonPressed'] #Which action button has the user pressed?
if ButtonPressed == "Button 0": #If the user pressed Action button 0 run the following
##YOUR CODE: ##
Textbox_2 = request.form.get("Textbox 2") #Input: The user's Textbox 2 input (e.g "Ethanol")
Textbox_3 = request.form.get("Textbox 3") #Input: The user's Textbox 3 input (e.g "Expired")
##Process the input however you want!##
Expired_Ethanol_List = LIMSQuery(request,"Reagents", [Textbox_2,Textbox_3], "fetchall_expired")
SubmissionResponse = {"Label 4":Expired_Ethanol_List} #Output: Change the text in Label 4
elif ButtonPressed == "Button 1": #if the user pressed a different button...
#etc
##END OF YOUR CODE##
except:
return 'An error has occured.', 400 #If nothing happens, return nothing
finally:
return jsonify(Info=SubmissionResponse)
Jupyter Notebook intergration:
Enable Third Party App Intergration in Settings_Panel/Local_Settings
import sys, requests #required imports
VIPERFolder = requests.post("http://127.0.0.1:7800/RefreshLogin", data="locate") #get VIPER_Utility folder
print(f"VIPER Folder: {VIPERFolder.text}")
sys.path.insert(0, VIPERFolder.text) #Prepare VIPER folder for importation
from VIPER_Utility import LIMSQuery #Import VIPER_Utility from VIPER_Client
print( LIMSQuery(request,"Reagents", [Textbox_2,Textbox_3], "fetchall_expired") )
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for VIPER_LIMS-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7ff409e418f19682f0e5ac25a8da2015cb6c7807dc3a26876269bf96d21c467 |
|
MD5 | 9337735c31df57c403e99e4c0e895874 |
|
BLAKE2b-256 | c3384c2a8c277fb09f29dde26edf9339ff3d6463c4d1fcf41cfa8d661d764a55 |