# Path: openprovider/api.py
# def api_factory(account=''):
#     username = _get_env('username', account)
#     try:
#         password_hash = _get_env('password_hash', account)
#         password = None
#     except KeyError:
#         password_hash = None
#         password = _get_env('password', account)
#     url = os.environ.get('OPENPROVIDER_URL', 'https://api.openprovider.eu')
# 
#     return OpenProvider(username=username, password=password, password_hash=password_hash, url=url)


from openprovider.api import api_factory
    from IPython import embed
import openprovider  # NOQA
import textwrap
import os
    import code
has been imported for you.

Use the environment variables OPENPROVIDER_USERNAME, OPENPROVIDER_PASSWORD and OPENPROVIDER_URL to
change the username and password.
"""


os.environ.setdefault('OPENPROVIDER_USERNAME', 'test')
os.environ.setdefault('OPENPROVIDER_PASSWORD', 'test')


try:
    # Try to use IPython...

    def repl():
        embed(banner1="")
except ImportError:
    # But if that fails, fall back to normal Python.

    def repl():
        code.interact(banner="", local=globals())

op = api_factory()

print(textwrap.dedent(__doc__).strip())
print("")
print("Address:  %s" % op.url)
print("Username: %s" % op.username)

# Clean up the environment

# Path: openprovider/api.py
# def api_factory(account=''):
#     username = _get_env('username', account)
#     try:
#         password_hash = _get_env('password_hash', account)
#         password = None
#     except KeyError:
#         password_hash = None
#         password = _get_env('password', account)
#     url = os.environ.get('OPENPROVIDER_URL', 'https://api.openprovider.eu')
# 
#     return OpenProvider(username=username, password=password, password_hash=password_hash, url=url)


# Path: openprovider/__main__.py
from openprovider.api import api_factory
    from IPython import embed
import openprovider  # NOQA
import textwrap
import os
    import code

has been imported for you.

Use the environment variables OPENPROVIDER_USERNAME, OPENPROVIDER_PASSWORD and OPENPROVIDER_URL to
change the username and password.
"""


os.environ.setdefault('OPENPROVIDER_USERNAME', 'test')
os.environ.setdefault('OPENPROVIDER_PASSWORD', 'test')


try:
    # Try to use IPython...

    def repl():
        embed(banner1="")
except ImportError:
    # But if that fails, fall back to normal Python.

    def repl():
        code.interact(banner="", local=globals())

op = api_factory()

print(textwrap.dedent(__doc__).strip())
print("")
print("Address:  %s" % op.url)
print("Username: %s" % op.username)

# Clean up the environment

del api_factory