INNER CODE UNIT · Python

deploy_python

piku/piku · piku.py:721

def deploy_python(app, deltas={}):
    """Deploy a Python application"""

    virtualenv_path = join(ENV_ROOT, app)
    requirements = join(APP_ROOT, app, 'requirements.txt')
    env_file = join(APP_ROOT, app, 'ENV')
    # Set unbuffered output and readable UTF-8 mapping
    env = {
        'PYTHONUNBUFFERED': '1',
        'PYTHONIOENCODING': 'UTF_8:replace'
    }
    if exists(env_file):
        env.update(parse_settings(env_file, env))

    # Support PYTHON_VERSION as "3", "3.12", etc.
    version = env.get("PYTHON_VERSION", "3")

    first_time = False

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…