Skip to main content

Makes aiohttp server autoreload on source code change

Project description

Makes aiohttp server autoreload on source code change.

It’s very first, heavily untested version that should be used only in development.

Code is taken from tornado.autoreload module.

call_periodic module is taken from akaIDIOT’s gist https://gist.github.com/akaIDIOT/48c2474bd606cd2422ca

Instalation

pip install aiohttp_autoreload

Proposed usage

import asyncio
import aiohttp_autoreload

debug = True  # Or false

loop = asyncio.get_event_loop()
handler = app.make_handler(
    debug=debug,
)

if debug:
    aiohttp_autoreload.start()

f = loop.create_server(handler, '0.0.0.0', 8080)
...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiohttp_autoreload-0.0.1.tar.gz (4.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page