Start serving an asyncio.Server
Project description
Serve asyncio and aiohttp servers, and show information for development.
Installation
$ pip install gera2ld-pyserve
# or with extra `aio` if aiohttp applications are to be served
$ pip install gera2ld-pyserve[aio]
Usage
Run an asynchronous function in an infinite event loop:
from gera2ld.pyserve import run_forever
async def main():
# do stuff
run_forever(main())
Start a server:
from gera2ld.pyserve import run_forever, start_server_asyncio
def handle(reader, writer):
# add more code here...
run_forever(start_server_asyncio(handle, ':4000'))
Start a server with aiohttp:
from gera2ld.pyserve import run_forever, start_server_aiohttp
from aiohttp import web
app = web.Application()
# add more code here...
run_forever(start_server_aiohttp(app, ':4000'))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gera2ld_pyserve-0.3.2.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gera2ld_pyserve-0.3.2.tar.gz.
File metadata
- Download URL: gera2ld_pyserve-0.3.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c9089c3720a0b75edd56b3dffe414afb038def0bdbcc94ae4481f8c107077f3
|
|
| MD5 |
b08269c41002153ed298d32b592d7c26
|
|
| BLAKE2b-256 |
0cc98db738ad28ec94c14d439695176057ebcb2fc062a486ea81104a614af2e2
|
File details
Details for the file gera2ld_pyserve-0.3.2-py3-none-any.whl.
File metadata
- Download URL: gera2ld_pyserve-0.3.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb03a2d1c3347b5863b1b91fe474bf9ca2ca158674fac263acd7bee6658eaed5
|
|
| MD5 |
44d226fc226dd0284368f9b4ff7c34cb
|
|
| BLAKE2b-256 |
7a105e5a25cf2c8a16f336ea21bdb62729c28ec68dec75cc4a3bf82073b889a8
|