An SDK for the MyTurn website. Selenium based as there is no REST API.
Project description
MyTurn SDK
A Selenium based SDK written in Python for the My Turn Lending Library Software.
Prerequisites
Google Chrome must be running on the machine this library runs on.
Installation
pip install myturn-sdk
Usage
Instantiate Library
myturnSubdomain = 'mylibrary'
myTurnUsername = 'testuser'
myturnPassword = 'Password!'
myTurnClient = MyTurnClient(
myturnSubdomain, myTurnUsername, myturnPassword)
Search for a User
request = UserSearchRequest()
request.email = 'homer@simpsons.com'
response = myTurnClient.users.searchUsers(request)
for user in response.users:
print(user.firstName+' '+user.lastName)
Other functionality follows a similar pattern:
- myTurnClient.users.getUser()
- myTurnClient.users.getUserIdForMembershipId()
- myTurnClient.users.getRequestsToJoin()
- myTurnClient.users.appendNote()
- myTurnClient.users.setNote()
- myTurnClient.users.getNote()
- myTurnClient.users.deleteUser()
See unit tests for examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
myturn-sdk-0.1.1.tar.gz
(29.1 kB
view hashes)
Built Distribution
myturn_sdk-0.1.1-py3-none-any.whl
(29.5 kB
view hashes)
Close
Hashes for myturn_sdk-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6a0f7326ffc6e1b8da93ce0ba9ad0fee197d7907ecf737c95f64a71113f9104 |
|
MD5 | b722c2b4441121e74afa30310ba39e6b |
|
BLAKE2b-256 | be471ba5706a6c1e9dc446b73bdce1b0b9042656a7104791210854116ba89d14 |