Here's another possible workaround, you can use the value of the
cwd (current working directory). Every time you run a Job or work inside a Workspace, the default
/floyd/home. Here's a template code that you can use to discriminate if you are local or inside a FloydHub environment:
IS_FLOYD_ENV = True if os.getcwd() == '/floyd/home' else False
Hope that helps.