Dhtcplib
--------
dhtcplib makes threaded TCP servers and connections to servers really easy.
```````````````
::
from time import sleep
from dhtcplib import dhtcp
'''
Start the server
'''
class MyHandlerClass:
def handle(data):
print("Handler got data: ", data)
return(data)
# Using a defined class with a 'handle' method to route requests
my_serv = dhtcp("127.0.0.1", 9000, RouterClass=MyHandlerClass)
my_serv.start()
try:
while True:
print("Do something in your main thread while the server slaves away!")
sleep(5)
except KeyboardInterrupt:
'''
Shutdown the server
'''
my_serv.kill()
And Easy to Install
```````````````````
::
$ pip3 install dhtcplib
Metadata
Release files for dhtcplib 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dhtcplib-0.2.1.tar.gz | 3.9 kB | Without provenance | Details for dhtcplib-0.2.1.tar.gz |
Release files / dhtcplib-0.2.1.tar.gz
| Download URL | dhtcplib-0.2.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7360c1dc7a83bdc648a206b28172ebcf22c4f583fdd231c0e41e9efb2722a07
|
|
BLAKE2b-256 checksum How to use checksums |
0ca730ef228ef1f1ade96a834f9b75330b4ea4860bb9067048907003e0481339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dhtcplib 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.