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'))
Release files for gera2ld-pyserve 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gera2ld_pyserve-0.3.2.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gera2ld_pyserve-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / gera2ld_pyserve-0.3.2.tar.gz
| Download URL | gera2ld_pyserve-0.3.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c9089c3720a0b75edd56b3dffe414afb038def0bdbcc94ae4481f8c107077f3
|
|
BLAKE2b-256 checksum How to use checksums |
0cc98db738ad28ec94c14d439695176057ebcb2fc062a486ea81104a614af2e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / gera2ld_pyserve-0.3.2-py3-none-any.whl
| Download URL | gera2ld_pyserve-0.3.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb03a2d1c3347b5863b1b91fe474bf9ca2ca158674fac263acd7bee6658eaed5
|
|
BLAKE2b-256 checksum How to use checksums |
7a105e5a25cf2c8a16f336ea21bdb62729c28ec68dec75cc4a3bf82073b889a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|