Skip to main content

A Staffomatic API Python wrapper

Project description

PyStaffo

PyStaffo is a Python wrapper library for the Staffomatic/Easypep API that simplifies many common tasks.

Installation

Either from PyPi:

$ pip install PyStaffo

Or from GitHub:

$ pip install git+https://github.com/perrydunn/PyStaffo

Requirements

  • Python 3 except 3.2 (untested on Python 2)
  • You need a Staffomatic account! A Staffomatic account includes a sub-domain name, and login details as a username and password.

Basic Use

from pystaffo import StaffoAccount

subdomain = '<subdomain>'
username = '<username>'
password = '<password>'

account = StaffoAccount(subdomain=subdomain, username=username, password=password)

# The locations and departments are cached as attributes of the class instance.
# Return dictionary of {'department_name': department_id, ...}:
account.locations

# Return the information of a particular location:
account.get_location('Westway')

Nuts and Bolts

A StaffoAccount() instance has various GET, PUT and POST API calls expressed as methods: these will be added to. So far there are no DELETE calls.

Please refer to the staffo.py for the methods currently available, and feel free to add some more!

Timezone Handling

PyStaffo handles timezones for you, using the timezone detailed in your account. If there are timezone issues you may need to look "under the hood". Please suggest improvements/alternatives.

Contributing

If you would like to see features added or tweaked, please fork, make your changes and open a PR. Feel free to get in touch too.

Aknowledgements

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

PyStaffo-0.1.4.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file PyStaffo-0.1.4.tar.gz.

File metadata

  • Download URL: PyStaffo-0.1.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for PyStaffo-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fcb5cf272bd15b8163a1b492b88668aaf076b3eccb49de5f7b96c12940bab50b
MD5 bb421b3ed9a544cd8fe59a35ff7f12b1
BLAKE2b-256 c36dee02f5a0b2437abc6db98eae9ea6cf59cd5b642b3d8016b6373fb600603a

See more details on using hashes here.

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