Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/001-manipulating-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# In this example script, we show you how to manage extra fields through the "metadata" attribute #
###################################################################################################

from pprint import pprint
import elabapi_python

# use the locally defined client.py module to get the api_client object, fully configured and ready to be used to instantiate api objects
Expand Down
1 change: 0 additions & 1 deletion examples/002-extra-field-to-column.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# In this example script, we want to grab information from metadata and add it to the Resource as a proper column #
###################################################################################################################

from pprint import pprint
import elabapi_python
import json

Expand Down
2 changes: 0 additions & 2 deletions examples/01-download-timestamp-archive.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env python
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

#########################
# CONFIG #
Expand Down
3 changes: 0 additions & 3 deletions examples/02-patch-metadata-per-category.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env python
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

#########################
# CONFIG #
Expand Down
5 changes: 1 addition & 4 deletions examples/03-experiment-file-handling.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env python
import os
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

#########################
# CONFIG #
Expand Down Expand Up @@ -40,7 +37,7 @@
for upload in uploadsApi.read_uploads('experiments', exp.id):
print(upload.id, upload.real_name, upload.comment)
# get and save file
with open(f'README.downloaded_with_api.md', 'wb') as file:
with open('README.downloaded_with_api.md', 'wb') as file:
# the _preload_content flag is necessary so the api_client doesn't try and deserialize the response
file.write(uploadsApi.read_upload('experiments', 256, upload.id, format='binary', _preload_content=False).data)
# delete all the files where the name is 'README.md'
Expand Down
3 changes: 0 additions & 3 deletions examples/04-create-teamgroup-add-user.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env python
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

#########################
# CONFIG #
Expand Down
3 changes: 0 additions & 3 deletions examples/05-create-modify-item.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env python
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

#########################
# CONFIG #
Expand Down
3 changes: 0 additions & 3 deletions examples/06-create-users.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env python
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

#########################
# CONFIG #
Expand Down
3 changes: 0 additions & 3 deletions examples/07-patch-sysadmin-settings.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env python
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

#########################
# CONFIG #
Expand Down
3 changes: 0 additions & 3 deletions examples/08-create-items-add-metadata.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env python
import time
import datetime
import elabapi_python
from elabapi_python.rest import ApiException

# necessary imports for this example
import csv
Expand Down
1 change: 0 additions & 1 deletion examples/13-events.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
import datetime

###############
# DESCRIPTION #
Expand Down
1 change: 0 additions & 1 deletion examples/14-fix-user-exp-permissions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
import datetime
import json

###############
Expand Down
2 changes: 0 additions & 2 deletions examples/18-archive-users.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env python
import datetime
import json
from datetime import datetime
from dateutil.relativedelta import relativedelta
# the python library for elabftw
Expand Down
Empty file modified examples/19-count-resources.py
100644 → 100755
Empty file.
Empty file modified examples/20-extract-cas.py
100644 → 100755
Empty file.