rosteron: Read-only RosterOn Mobile roster access

latest release on PyPI build & test status test coverage status documentation build status on Read the Docs

The rosteron module allows read-only access to rostering information in instances of RosterOn Mobile, a workforce management product from Allocate Software.

>>> import rosteron
>>> with rosteron.Session('https://rosteron.xyz.com.au/RosterOnProd/Mobile') as session:
...     session.log_in('joe.bloggs', 'abc123')
...     snapshot = session.get_roster()
>>> print(snapshot)
<Snapshot (time=2019-06-10T08:03:12+00:00, len=19)>
>>> for item in snapshot[:3]:
...     print(item)
<Item (date=2019-06-11, title='ABCDE - Melbourne Office', detail=('10:30 - 18:06', None, 'XYZ', 'Assistant'))>
<Item (date=2019-06-12, title='ABCDE - Melbourne Office', detail=('10:30 - 18:06', None, 'XYZ', 'Assistant'))>
<Item (date=2019-06-13, title='ABCDE - Melbourne Office', detail=('10:30 - 18:06', None, 'XYZ', 'Assistant'))>

Complete documentation is hosted on Read the Docs.

Features

  • Roster data includes server-side retrieval timestamps.
  • Sessions automatically log out after use (when used in a with block).
  • Meaningful Python exceptions are raised when problems arise.
  • Requests & responses to/from RosterOn can optionally be logged to files for debugging.

Installation

Install this module from PyPI using pip:

pip install rosteron

Support

The rosteron module is fully documented. Bug reports, feature requests, and questions are welcome via the issue tracker.

Documentation:https://python-rosteron.readthedocs.io
Issue tracker:https://github.com/Lx/python-rosteron/issues

Contribute

Sample responses from other RosterOn installations

Roster output is minimally structured on the assumption that each RosterOn instance formats its data differently (the author has only seen data from one RosterOn Mobile instance).

Roster response samples from other RosterOn Mobile instances would be very gratefully received, as these may demonstrate uniformity across all instances, which would allow future releases of this module to provide more structured output.

Source code

Pull requests are gratefully received and considered.

GitHub repository:
 https://github.com/Lx/python-rosteron

License

This project is licensed under the MIT License.

Copyright (c) 2019 Alex Peters

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Index