Skip to main content

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


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)

Uploaded Source

Built Distribution

myturn_sdk-0.1.1-py3-none-any.whl (29.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page