mrx-runway

raw JSON →
1.13.3 verified Fri May 01 auth: no python

mrx-runway (makina-runway) is a rapid application development framework for Python, providing scaffolding, API generation, and deployment tooling. The current version is 1.13.3, released with requires_python <3.12,>=3.8. Release cadence is irregular.

pip install mrx-runway
error ModuleNotFoundError: No module named 'runway'
cause Importing directly from 'runway' instead of 'mrx.runway' after version 1.12.
fix
Use 'from mrx import runway' instead of 'import runway'.
error ImportError: cannot import name 'async' from 'runway'
cause Using deprecated @runway.async decorator.
fix
Use @app.async_endpoint decorator.
error runway.exceptions.ConfigurationError: Missing required environment variable: runway_SECRET_KEY
cause The runway_SECRET_KEY environment variable is not set.
fix
Set the environment variable, e.g., export runway_SECRET_KEY='your-secret-key'.
error pkg_resources.VersionConflict: (mrx-runway 1.13.3 ... Requirement.parse('mrx-runway<3.12,>=3.8'))
cause Attempting to install on Python 3.12 or newer.
fix
Use Python 3.8 to 3.11.
error sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: user
cause Not running database migrations before accessing models.
fix
Run 'runway db upgrade' in your project directory.
breaking In version 1.12, the package structure changed: imports must now use 'from mrx import runway' instead of 'import runway'. Old code will raise ImportError.
fix Update all imports to 'from mrx import runway'.
gotcha The framework requires Python <3.12 and >=3.8. Using Python 3.12+ will cause installation failures.
fix Use Python 3.8 to 3.11.
deprecated The @runway.async decorator is deprecated since version 1.10. Use @app.async_endpoint instead.
fix Replace @runway.async with @app.async_endpoint on async views.
gotcha When using SQLAlchemy with runway, you must set the runway_SQLALCHEMY_DATABASE_URI environment variable. Not setting it causes silent fallback to SQLite.
fix Set the environment variable or pass database_uri to runway.Application().
gotcha Runway's static file serving only works in development mode. In production, use a reverse proxy like Nginx.
fix In production, configure Nginx to serve static files from the 'static' folder.
deprecated The 'runway.contrib.admin' module is deprecated from version 1.11. Use 'runway.contrib.adminlte' instead.
fix Replace 'from runway.contrib.admin import ...' with 'from runway.contrib.adminlte import ...'.
pip install mrx-runway[all]

Create a simple runway application.

from mrx import runway

app = runway.Application()

@app.route('/')
def hello():
    return {'message': 'Hello World'}

if __name__ == '__main__':
    app.run()