LabKey Scripts
This repository contains Python scripts that perform various tasks using the LabKey Python API. These scripts help interact with LabKey Server for data retrieval, updates, and management tasks.
Requirements
- Python 3.x
-
labkey
Python package -
.netrc
file for authentication (https://www.labkey.org/Documentation/wiki-page.view?name=netrc)
Scripts Overview
1. Create_Project.py
- Creates a new project in LabKey.
- Takes a project name as a command-line argument.
- If the project already exists, it notifies the user.
Usage:
python Create_Project.py <project_name>
2. Create_Project_and_subfolder.py
- Creates a project and a Sample Manager type subfolder in LabKey.
- Takes both a project name and a subfolder name as arguments.
Usage:
python Create_Project_and_subfolder.py <project_name> <subfolder_name>
3. Get_projects_list.py
- Connects to the LabKey server using credentials stored in a
.netrc
file. - Retrieves a list of projects and folders.
Usage:
python Get_projects_list.py
Contributing
Feel free to submit pull requests for enhancements or bug fixes. Ensure that your code follows best practices and includes comments where necessary.
License
This project is licensed under the MIT License.
Contact
For questions or issues, reach out to scicore-admin@unibas.ch.