Skip to main content

Async server for userv

Project description

The catch

Simple async webserver

Webserver

first we need to add routes to a router. Atm creating json or text responses is part of the webserver but will be generalised to the core in future.

First we add a server task to the event loop Example:

from userv.routing import Router
from userv.async_server import App
router = Router()

web_server = App(router)
web_server.run_task()

Now we have added the current app to the event loop and stll work on other tasks. It will be run when we trigger the loop.run as all async tasks should.

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

userv.async_server-0.1.3.tar.gz (2.1 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