Skip to content

helle-ulrich-lab/python-labfolder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python-labfolder

This is a basic implementation of the LabFolder API v2 in Python.

Installation

git clone https://github.com/helle-ulrich-lab/python-labfolder

With conda

conda create -n labfolder_api python==3.11 requests # ipykernel, if you want to use the included Jupyter notebook

Usage

import labfolder

lf = labfolder.LabFolder()

# Log in
lf.login(username='[email protected]')

# Set a group
lf.set_group(group_id=1234)

# Get users from the group
user1 = lf.group.get_user(username='[email protected]')
user2 = lf.group.get_user(username='[email protected]')

# Get folders, entries and projects for a user.
# If no user is provided, it defaults to the
# logged user
folders = lf.get_folders(user=user1)
entries, projects = lf.get_entries_projects(user=user1)

# Change the owner of a folder
lf.set_owner(record=folders[0], new_owner=user2)

# Export an entry as PDF
lf.export_as_pdf(record=entries[0])

# Log out
lf.logout()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published