Tiny socket server helper with startServer and sendToConnected.
Project description
connecter
Tiny Python socket helper.
Install locally
pip install .
Use as a server
import connecter
def got_message(message, address):
print(f"{address}: {message}")
connecter.startServer(port=5050, on_message=got_message)
connecter.sendToConnected("Server is online")
String ports also work:
connecter.startServer("0.0.0.0", "5050")
Use as a client
import connecter
connecter.Connect("127.0.0.1", port=5050)
connecter.sendToServer("hello server")
String ports also work:
connecter.Connect("127.0.0.1", "5050")
Open the connecter console
import connecter
connecter.cmd()
Console commands: start, connect, send, clients, stop, exit.
Build for PyPI
python -m pip install build twine
python -m build
python -m twine upload dist/*
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
connecter-0.1.2.tar.gz
(4.9 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 connecter-0.1.2.tar.gz.
File metadata
- Download URL: connecter-0.1.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa9043f612c90d8350c6954326e60ef6b5f9bad33f5cd3508d92fdb384ba8318
|
|
| MD5 |
244eafc091d0484d518a364341b1ec4d
|
|
| BLAKE2b-256 |
739ae5669a2767a7feb22c376dc21b3cbfc0102c111ae52ca1c7b79879cf0418
|
File details
Details for the file connecter-0.1.2-py3-none-any.whl.
File metadata
- Download URL: connecter-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a26c63d42313f16bbf213cfdd9482e20098fc3aafef2b5e381e42ad969d10973
|
|
| MD5 |
294f7fb79de6e7aea0a147f7a04bda07
|
|
| BLAKE2b-256 |
6fb92801179d40b665be3870df2af93eb15f4ff4c055e612606515c452b9802f
|