Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Uvicontainer

Ported from uvicorn, Aim to be a fast general TCP/UDP servcer

example

import asyncio

import uvicontainer


class EchoServerProtocol(asyncio.Protocol):
    def connection_made(self, transport):
        peername = transport.get_extra_info('peername')
        print('Connection from {}'.format(peername))
        self.transport = transport

    def data_received(self, data):
        message = data.decode()
        print('Data received: {!r}'.format(message))

        print('Send: {!r}'.format(message))
        self.transport.write(data)

        print('Close the client socket')
        self.transport.close()


if __name__ == "__main__":
    uvicontainer.run("main:EchoServerProtocol", host="0.0.0.0", port=8000, workers=3, type="tcp")

Metadata

Release files for uvicontainer 0.1.1rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uvicontainer 0.1.1rc1
File Size Uploaded
uvicontainer-0.1.1rc1.tar.gz 29.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uvicontainer 0.1.1rc1
File Interpreter ABI Platform
uvicontainer-0.1.1rc1-py3-none-any.whl Python 3 none any Details

Total release size: 71.9 kB

Release files / uvicontainer-0.1.1rc1.tar.gz

Download URL uvicontainer-0.1.1rc1.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
967b020dddf495b4232344dc2ef58ee0ce829b28f641d69c0851cc6811768011
BLAKE2b-256 checksum
How to use checksums
2ddf4152716dc958c4eb7a78e3a93d9d42037915806bdf0e5af129bb73d07254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / uvicontainer-0.1.1rc1-py3-none-any.whl

Download URL uvicontainer-0.1.1rc1-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
576cd6697694694bebeb2d247be9ff20431a777911ceb01429dc7a87ee37e97c
BLAKE2b-256 checksum
How to use checksums
ad4ef0bc2be6188143b2d099f8df3c3fe854feba30de1c741eb466c59901475b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.1.1rc1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page