Skip to content

v1.1.3

Choose a tag to compare

@fuho fuho released this 13 Jan 15:46
· 38 commits to main since this release
d66320f
  • Added support for ASGI through DynoscaleAsgiApp class
  • Added options to control DS repository storage location with environment variables

.
..
...
If you have an ASGI app (ex.: Starlette, Responder, FastAPI, Sanic, Django, Guillotina, ...) pass your ASGI app
into DynoscaleASGIApp:

# `web.py` - Starlette Example
import os

from starlette.applications import Starlette
from starlette.responses import Response
from starlette.routing import Route

from dynoscale.asgi import DynoscaleAsgiApp


async def home(_):
    return Response("Hello from Starlette, scaled by Dynoscale!", media_type='text/plain')


app = DynoscaleAsgiApp(Starlette(debug=True, routes=[Route('/', endpoint=home, methods=['GET'])]))

if __name__ == "__main__":
    import uvicorn

    uvicorn.run('web:app', host='0.0.0.0', port=int(os.getenv('PORT', '8000')), log_level="info")

...
..
.

... more info in README.md