VIPER-LIMS


NameVIPER-LIMS JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/JackLawrenceCRISPR/VIPER-LIMS
SummaryA free and open-source LIMS software with scriptable modules.
upload_time2024-02-21 15:16:39
maintainer
docs_urlNone
authorVIPER-LIMS (Jack Lawrence)
requires_python>=3.7
licenseMIT
keywords python installer lims science
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<h1 align="center">Virtual Interface for Production & Experimental Research</h1>
<p align="center">
  <picture>
    <source srcset="https://raw.githubusercontent.com/JackLawrenceCRISPR/VIPER_LIMS/main/VIPER_Client/Sources/VIPER/Viper_Icon_Small.ico"> 
    <img src="https://raw.githubusercontent.com/JackLawrenceCRISPR/VIPER_LIMS/main/VIPER_Client/Sources/VIPER/Viper_Icon_Small.ico">
  </picture>
</p>
<h3 align="center">Easy | Modular | Lightweight</h3>

<p align="center">A simple, highly scalable & adaptable LIMS system for rapidly evolving laboratory teams.</p>

# 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 Methods
- **Server Methods:** 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
### Desktop Installation
[Requires Python (>=3.7)](https://www.python.org/downloads/)

Operating System terminal:  
```
pip install VIPER_LIMS
```

Python terminal or script:  
```python
import VIPER_LIMS
VIPER_LIMS.Install()
```
Please see the Server Installation Guide or Client Installation Guide below.

_Alternatively: download this repository and run VIPER_Installer/VIPER_LIMS/VIPER_Installer.py_


### Android Installation
Only the VIPER_Client is available for Android; it is not advised to run a VIPER_Server from Android devices.
1. Install Termux from [Github](https://github.com/termux/termux-app/releases) or [FDroid](https://f-droid.org/en/packages/com.termux/)
2. In the Termux app run the following commands in order, whilst reading and accepting appropraite requests:  
```pkg install python```  
```apt update```  
```apt upgrade```  
```pkg install python-cryptography```  
```pip install VIPER_LIMS```  
```python3```  
```import VIPER_LIMS```  
```VIPER_LIMS.Install()```    
Please see the Client Installation Guide below and type ```exit()``` when you are finished.

Once the installation is complete you can run the VIPER_Client through Termux with the command:  
```python3 VIPER_Client/VIPER_Client.py```

# Server Installation Guide
[Server Install Tutorial](VIPER_Videos/VIPER_Server_Install_Compressed.mp4)

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.Install("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](https://whatismyipaddress.com/)  

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](https://dev.mysql.com/downloads/workbench/) 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](https://www.linkedin.com/developers/secure/developer)  
- [Github OAuth2](https://github.com/settings/applications/new)  
- [Other available services which require manual configuration](https://requests-oauthlib.readthedocs.io/en/latest/examples/examples.html)  
- [Further reading if you want to set up your own](https://github.com/topics/oauth2-server?l=python)  

*The VIPER_Server will need:*
- Client ID
- Client Secret
- Callback URL


# Client Installation Guide
[Client Install Tutorial](VIPER_Videos/VIPER_Client_Install_Compressed.mp4)
1. ```VIPER_LIMS.Install("Client")```
2. Paste the desired deployment folder directory
3. Paste the VIPER_Server SDump (or "none" if you do not have one yet)
4. To connect to a new Server go to Settings_Panel -> Local_Settings, then Paste an SDump -> Click *Autosetup SDump*
5. 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](VIPER_Videos/VIPER_Client_Tour.mp4)


# Applications
## Boa Constructor
Build your own modules:
[Boa Constructor Tutorial](VIPER_Videos/VIPER_Boa_Constructor_Compressed.mp4)

Highly modular, simple, completely customisable scripts for rapidly evolving teams
1. Launch the Client  
2. Assemble an HTML page using Boa Constructor  
3. See **Coding a *Module_Script.py***
4. Activate your module in Settings_Panel/Module_Toggler
5. Restart VIPER_Client

## Coding a *Module_Script.py*:
```python
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 Method:
```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,  
**Method**:  The VIPER_Server method through which the Command will be processed,  
**)** 

```python
#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 integration:  
Enable Third Party App Integration in Settings_Panel/Local_Settings  
```python
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") )
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JackLawrenceCRISPR/VIPER-LIMS",
    "name": "VIPER-LIMS",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "python,installer,lims,science",
    "author": "VIPER-LIMS (Jack Lawrence)",
    "author_email": "<JackLawrenceCRISPR@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d2/af/2dfdf8707fd2de22f10002cc8c3bdc2e9cf062f190a2f36420c650671139/VIPER-LIMS-0.1.3.tar.gz",
    "platform": null,
    "description": "\r\n<h1 align=\"center\">Virtual Interface for Production & Experimental Research</h1>\r\n<p align=\"center\">\r\n  <picture>\r\n    <source srcset=\"https://raw.githubusercontent.com/JackLawrenceCRISPR/VIPER_LIMS/main/VIPER_Client/Sources/VIPER/Viper_Icon_Small.ico\"> \r\n    <img src=\"https://raw.githubusercontent.com/JackLawrenceCRISPR/VIPER_LIMS/main/VIPER_Client/Sources/VIPER/Viper_Icon_Small.ico\">\r\n  </picture>\r\n</p>\r\n<h3 align=\"center\">Easy | Modular | Lightweight</h3>\r\n\r\n<p align=\"center\">A simple, highly scalable & adaptable LIMS system for rapidly evolving laboratory teams.</p>\r\n\r\n# Features\r\n- **Customisable clientside:** Build your own VIPER modules in Python and help from Boa Constructor\r\n- **Boa Constructor:** Make new HTML-Javascript-Python front-end modules with simple drag and drop\r\n- **Client Scripting:** Beginner friendly code with complete control for advanced programmers\r\n- **Client Commands:** Scriptable client to server requests passed through Server Methods\r\n- **Server Methods:** Programmable permission authenticated serverside functions\r\n- **Security:** OAuth2 user verification and encrypted HTTP requests\r\n- **SQL:** Intrinsic support for MySQL, PostgreSQL and SQLite \r\n- **OAuth2:** Intrinsic support for Github and LinkedIn OAuth2 Apps\r\n\r\n### The Vision\r\n- Lightweight plug-and-play framework\r\n- Power for beginner programmers\r\n- Freedom for advanced programmers\r\n- Competency based permissions\r\n\r\n# Installation\r\n### Desktop Installation\r\n[Requires Python (>=3.7)](https://www.python.org/downloads/)\r\n\r\nOperating System terminal:  \r\n```\r\npip install VIPER_LIMS\r\n```\r\n\r\nPython terminal or script:  \r\n```python\r\nimport VIPER_LIMS\r\nVIPER_LIMS.Install()\r\n```\r\nPlease see the Server Installation Guide or Client Installation Guide below.\r\n\r\n_Alternatively: download this repository and run VIPER_Installer/VIPER_LIMS/VIPER_Installer.py_\r\n\r\n\r\n### Android Installation\r\nOnly the VIPER_Client is available for Android; it is not advised to run a VIPER_Server from Android devices.\r\n1. Install Termux from [Github](https://github.com/termux/termux-app/releases) or [FDroid](https://f-droid.org/en/packages/com.termux/)\r\n2. In the Termux app run the following commands in order, whilst reading and accepting appropraite requests:  \r\n```pkg install python```  \r\n```apt update```  \r\n```apt upgrade```  \r\n```pkg install python-cryptography```  \r\n```pip install VIPER_LIMS```  \r\n```python3```  \r\n```import VIPER_LIMS```  \r\n```VIPER_LIMS.Install()```    \r\nPlease see the Client Installation Guide below and type ```exit()``` when you are finished.\r\n\r\nOnce the installation is complete you can run the VIPER_Client through Termux with the command:  \r\n```python3 VIPER_Client/VIPER_Client.py```\r\n\r\n# Server Installation Guide\r\n[Server Install Tutorial](VIPER_Videos/VIPER_Server_Install_Compressed.mp4)\r\n\r\nStore the *VIPER_Server will need:* information from the *SQL Database* and *OAuth 2.0 Service* sections below  \r\nRun the following command and provide the requested information:\r\n```VIPER_LIMS.Install(\"Server\")```\r\n\r\n## Server IP Address: \r\nBefore you start you should know the **local IP of your VIPER_Server**.  \r\nUse ```ipconfig``` on Windows or ```ifconfig``` on Unix based systems and get your IPV4 local IP address (usually 192.168.X.X)  \r\nIf you do not intend to host your VIPER_Server online then your VIPER_Server IP Address will be this local IP  \r\n\r\nIf 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  \r\n[Afterwards use your public IP Address](https://whatismyipaddress.com/)  \r\n\r\nYou will use this IP address for the OAuth2 service callback URL.\r\n**If your IP Address changes you must update the callback URL.**\r\n\r\n## SQL Database\r\nThe database which your LIMS requests will access.  \r\n[MySQL is recommended](https://dev.mysql.com/downloads/workbench/) but PostgreSQL or SQLite should be compatible  \r\n\r\n*The VIPER_Server will need:*\r\n- Username\r\n- Password\r\n- IP Address of SQL Server \r\n- Port of SQL Server (default is 3306 for MySQL)\r\n\r\n## OAuth 2.0 Service\r\nThe service which hosts your users accounts, pick ONE:  \r\n- [LinkedIn OAuth2](https://www.linkedin.com/developers/secure/developer)  \r\n- [Github OAuth2](https://github.com/settings/applications/new)  \r\n- [Other available services which require manual configuration](https://requests-oauthlib.readthedocs.io/en/latest/examples/examples.html)  \r\n- [Further reading if you want to set up your own](https://github.com/topics/oauth2-server?l=python)  \r\n\r\n*The VIPER_Server will need:*\r\n- Client ID\r\n- Client Secret\r\n- Callback URL\r\n\r\n\r\n# Client Installation Guide\r\n[Client Install Tutorial](VIPER_Videos/VIPER_Client_Install_Compressed.mp4)\r\n1. ```VIPER_LIMS.Install(\"Client\")```\r\n2. Paste the desired deployment folder directory\r\n3. Paste the VIPER_Server SDump (or \"none\" if you do not have one yet)\r\n4. To connect to a new Server go to Settings_Panel -> Local_Settings, then Paste an SDump -> Click *Autosetup SDump*\r\n5. Type *off* or *on* and click *Set ServerURL* to disable or enable online mode  \r\n**To Logout go to Settings_Panel/Logout AND Logout of your OAuth2 Service**\r\n[Client Tour Tutorial](VIPER_Videos/VIPER_Client_Tour.mp4)\r\n\r\n\r\n# Applications\r\n## Boa Constructor\r\nBuild your own modules:\r\n[Boa Constructor Tutorial](VIPER_Videos/VIPER_Boa_Constructor_Compressed.mp4)\r\n\r\nHighly modular, simple, completely customisable scripts for rapidly evolving teams\r\n1. Launch the Client  \r\n2. Assemble an HTML page using Boa Constructor  \r\n3. See **Coding a *Module_Script.py***\r\n4. Activate your module in Settings_Panel/Module_Toggler\r\n5. Restart VIPER_Client\r\n\r\n## Coding a *Module_Script.py*:\r\n```python\r\nExpired_Ethanol_List = LIMSQuery(False, \"Reagents\", [\"Ethanol\",\"Expired\"], \"fetchall_criteria\")) #Access the LIMS SQL Database\r\n```\r\nWhich could execute the following on the server through a fetchall_criteria Method:\r\n```sql\r\nSELECT * FROM Ethanol WHERE Expired = True\r\n```\r\n\r\nIn this example we are fetching all Expired Reagents:  \r\n**LIMSQuery(**  \r\n**False**:     Initiates LIMSQuery's Third Party App support,  \r\n**Database**:  The database within which to execute the SQL process,  \r\n**Command**:   The data necessary to perform the request,  \r\n**Method**:  The VIPER_Server method through which the Command will be processed,  \r\n**)** \r\n\r\n```python\r\n#Example Boa Constructed module script:\r\ndef Process_User_Request(request):  #Runs when the user clicks a button on your Boa Constructed VIPER Module\r\n    try:\r\n        ButtonPressed = request.form['SubmitButtonPressed']  #Which action button has the user pressed?\r\n        if ButtonPressed == \"Button 0\":                      #If the user pressed Action button 0 run the following\r\n##YOUR CODE: ##\r\n            Textbox_2 = request.form.get(\"Textbox 2\")             #Input: The user's Textbox 2 input (e.g \"Ethanol\")\r\n            Textbox_3 = request.form.get(\"Textbox 3\")             #Input: The user's Textbox 3 input (e.g \"Expired\")\r\n\r\n            ##Process the input however you want!##\r\n            Expired_Ethanol_List = LIMSQuery(request,\"Reagents\", [Textbox_2,Textbox_3], \"fetchall_expired\") \r\n            SubmissionResponse = {\"Label 4\":Expired_Ethanol_List} #Output: Change the text in Label 4\r\n\r\n        elif ButtonPressed == \"Button 1\":                 #if the user pressed a different button...\r\n            #etc\r\n##END OF YOUR CODE##\r\n    except:\r\n        return 'An error has occured.', 400 #If nothing happens, return nothing\r\n    finally:        \r\n        return jsonify(Info=SubmissionResponse) \r\n```\r\n\r\n## Jupyter Notebook integration:  \r\nEnable Third Party App Integration in Settings_Panel/Local_Settings  \r\n```python\r\nimport sys, requests #required imports\r\nVIPERFolder = requests.post(\"http://127.0.0.1:7800/RefreshLogin\", data=\"locate\") #get VIPER_Utility folder\r\nprint(f\"VIPER Folder: {VIPERFolder.text}\")\r\nsys.path.insert(0, VIPERFolder.text) #Prepare VIPER folder for importation\r\nfrom VIPER_Utility import LIMSQuery #Import VIPER_Utility from VIPER_Client\r\n\r\nprint( LIMSQuery(request,\"Reagents\", [Textbox_2,Textbox_3], \"fetchall_expired\") )\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A free and open-source LIMS software with scriptable modules.",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/JackLawrenceCRISPR/VIPER-LIMS"
    },
    "split_keywords": [
        "python",
        "installer",
        "lims",
        "science"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f8b29b8fa2d1e09a8f8adbd4fdc01c37789a1fd4d4682688515f88bcb447423",
                "md5": "e7693f3b0f63accd25a58c45c630bb81",
                "sha256": "b9d95f5d9887d410475c4789440c44ac29ee0402e625b4821be322f0ecbcc1bc"
            },
            "downloads": -1,
            "filename": "VIPER_LIMS-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e7693f3b0f63accd25a58c45c630bb81",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10452,
            "upload_time": "2024-02-21T15:16:38",
            "upload_time_iso_8601": "2024-02-21T15:16:38.186407Z",
            "url": "https://files.pythonhosted.org/packages/2f/8b/29b8fa2d1e09a8f8adbd4fdc01c37789a1fd4d4682688515f88bcb447423/VIPER_LIMS-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2af2dfdf8707fd2de22f10002cc8c3bdc2e9cf062f190a2f36420c650671139",
                "md5": "92a8a0525c35845f4ad8b8e83945ca5c",
                "sha256": "5547703e8c058bec22b7ab77c91710060bcdb2707d45852a3c6e749f491e172d"
            },
            "downloads": -1,
            "filename": "VIPER-LIMS-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "92a8a0525c35845f4ad8b8e83945ca5c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 13770,
            "upload_time": "2024-02-21T15:16:39",
            "upload_time_iso_8601": "2024-02-21T15:16:39.319222Z",
            "url": "https://files.pythonhosted.org/packages/d2/af/2dfdf8707fd2de22f10002cc8c3bdc2e9cf062f190a2f36420c650671139/VIPER-LIMS-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-21 15:16:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JackLawrenceCRISPR",
    "github_project": "VIPER-LIMS",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "viper-lims"
}
        
Elapsed time: 0.27577s