Package: simpl-cloud
Base models and API for Django-based simulations.Provides an API compatible with the  Wharton Interactive marketplace.Getting StartedInstall simpl-cloud, with the API extras if required:pip install simpl-cloud[api]Add simpl to your project’s Django settings module, along with the following
settings:INSTALLED_APPS = {
    # ...
    'simpl',
}
SIMPL_GAME_EXPERIENCE = "simpl.GameExperience"
SIMPL_RUN = "simpl.Run"
SIMPL_INSTANCE = "simpl.Instance"
SIMPL_CHARACTER = "simpl.Character"
SIMPL_PLAYER = "simpl.Player"
SIMPL_LOGOUT_URL_NAME = "account_logout"Add the following to your project’s URL conf:urlpatterns = [
  # ...
  path("simpl/", include("simpl.urls")),
]Architecture OverviewRunobjects provide management and configuration of one or more game instances.NavigationProvide a function to theSIMPL_SETUP_NAVsetting. It should accept a Run
object as an argument and return a dictionary of keys as Simpl URL names and the
values as a dictionary with the name, optional hint, and one of the
following statuses:simpl.nav.DISABLED(and unstarted)simpl.nav.UNSTARTEDsimpl.nav.INCOMPLETEsimpl.nav.READYsimpl.nav.COMPLETEFor example:return {
    "config": {
        "name": "Game Configuration",
        "status": nav.UNSTARTED,
    },
    "team": {
        "name": "Manage Teams",
        "status": nav.DISABLED,
    },
    "start": {
        "name": "Start Game",
        "status": nav.DISABLED,
    },
}Provide a function to theSIMPL_PLAY_NAVsetting. It should accept a Run
object as an argument and return a dictionary of keys as Simpl URL names and the
values as a dicitonary with the name and one of the following statuses:simpl.constants.DISABLEDsimpl.constants.READYLaunching game instancesWhen a player is added to a run, their details are stored in aPlayerobject.When they start playing your game, they will be attached to anCharacterobject in a gameInstanceobject that will track the progress of their game.For multiplayer runs, these players will be initially grouped intoLobbyobject so they can be assigned to a game Instances. A lobby can be marked asreadyonce it is ready to start.You can useRun.prepareto create new gameInstanceobjects or manually
create these.Game play URLThe API uses a customizable url endpoint for players. You can specify this by
using a customPlayermodel and overridingPlayer.get_play_url.Alternatively, you can specify aSIMPL_GET_PLAY_URLin your settings as a
dotted path to a function that receives a player instance and returns the
correct url.Run statusA run has the following statuses:Set up (initial state, until any configuration options are provided)Players prepare (optional step to if your game experience if players can
interact with their Instance before gameplay starts)Running (game Instances are running)Debrief (optional step if your game experience provides a different interface
after gameplay finishes)Game Instance statusEach game Instance also has a status:Preparing - waiting to start (Instance.date_startunset)Playing - game in progress (Instance.date_startset butInstance.date_endunset)Ended - game complete (Instance.date_endset)Player statusYour app may mark a player as havingcompletedthe game (with a date).Custom modelsExtend the Simpl Django models by overriding the default classes in your
project’s Django settings module:InstanceviaSIMPL_INSTANCE = "your_app.YourInstance"CharacterviaSIMPL_CHARACTER = "your_app.YourCharacter"GameExperience(only if your app provides multiple different game
experiences)  viaSIMPL_GAME_EXPERIENCE = "your_app.YourGameExperience"More rarely, you may also want to override the run and player:RunviaSIMPL_RUN = "your_app.YourRun"PlayerviaSIMPL_PLAYER = "your_app.YourPlayer"Your overridden classes should subclass the relatedsimpl.models.Base*abstract models.The Character class will need two related abstract models,BaseCharacterDataandBaseCharacterLinked. This is to make it possible to have character data
as a template, not linked to a user or instance.Auth0If using Auth0 for social authentication, add the following Django settings to
make sure users are correctly logged out of Auth0 and (optionally) redirected after logout:ACCOUNT_ADAPTER = "simpl.auth0.Auth0LogoutAdapter"
AUTH0_LOGOUT_RETURN_TO = "some.url"