Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.


Mobius - Service for assigning workers to shifts according to constraints

Moonlight contractors

Staffjoy is shutting down, so we are open-sourcing our code. Mobius is an applied mathematics microservice for assigning workers to shifts, subject to constraints like availability and worker availability. This tool relies on the Gurobi Python library, which is closed source.

This tool was used for Staffjoy V1 (Suite) customers, and Mobius (in conjunction with Chomp) replaced the previous Autoscheduler algorithm.


This repository was conceived and authored in its entirety by @philipithomas. This is a fork of the internal repository. For security purposes, the Git history has been squashed and client names have been scrubbed from tests.


If you are self-hosting Mobius, please make sure that you are using version >=0.24 of the staffoy client (in requirements.txt). Then, modify mobius/ to include your custom domain - when initializing Client(), pass in your custom URL base, e.g. Client(url_base=", key=config.STAFFJOY_API_KEY, env=config.ENV),

Project Mobius

Microservice for assigning workers to shifts subect to constraints and happiness.


Provision the machine with vagrant. When you first run the program or when you change requirements.txt, run make requirements to install and freeze the required libraries.

vagrant up
vagrant ssh
# (In VM)
cd /vagrant/
make dependencies


This library uses the Google YAPF library to enforce PEP-8. Using it is easy - run make fmt to format your code inline correctly. Failure to do this will result in your build failing. You have been warned.

To disable YAPf around code that you do not want changed, wrap it like this:

# yapf: disable
FOO = {
    # ... some very large, complex data literal.

BAR = [
    # ... another large data literal.
# yapf: enable


Staffjoy Suite (V1) Microservice - Shift Assignment Subject To Constraints




No releases published
You can’t perform that action at this time.