Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit bc64602

Browse files
committed
add login test script
1 parent f71bb58 commit bc64602

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test_login.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import sys
2+
import paperspace
3+
4+
if not paperspace.login():
5+
sys.exit(1)
6+
7+
print("paperspace.jobs.getJobs({'project': 'all'})")
8+
jobs = paperspace.jobs.getJobs({'project': 'all'})
9+
if 'error' in jobs:
10+
paperspace.print_json_pretty(jobs)
11+
else:
12+
if jobs:
13+
print(jobs[-1]['id'])

0 commit comments

Comments
 (0)