sevent
The highest performance event loop.
Examples
Simple Http Client
import sevent
def on_data(s, data):
print(data.decode("utf-8"))
s = sevent.tcp.Socket()
s.on_data(on_data)
s.on_close(lambda s: sevent.current().stop())
s.connect(('www.google.com', 80))
s.write(b'GET / HTTP/1.1\r\nHost: www.google.com\r\nConnection: Close\r\nUser-Agent: curl/7.58.0\r\nAccept: */*\r\n\r\n')
sevent.instance().start()
import sevent
async def http_test():
s = sevent.tcp.Socket()
await s.connectof(('www.google.com', 80))
await s.send(b'GET / HTTP/1.1\r\nHost: www.google.com\r\nConnection: Close\r\nUser-Agent: curl/7.58.0\r\nAccept: */*\r\n\r\n')
data = b''
while True:
try:
data += (await s.recv()).read()
except sevent.tcp.SocketClosed:
break
print(data.decode("utf-8"))
await s.closeof()
sevent.run(http_test)
Simple TCP Port Forward
import sys
import sevent
def on_connection(server, conn):
pconn = sevent.tcp.Socket()
pconn.connect((sys.argv[2], int(sys.argv[3])))
conn.link(pconn)
server = sevent.tcp.Server()
server.on_connection(on_connection)
server.listen(("0.0.0.0", int(sys.argv[1])))
sevent.instance().start()
import sys
import sevent
async def tcp_port_forward_server():
server = sevent.tcp.Server()
server.listen(("0.0.0.0", int(sys.argv[1])))
while True:
conn = await server.accept()
pconn = sevent.tcp.Socket()
pconn.connect((sys.argv[2], int(sys.argv[3])))
conn.link(pconn)
sevent.run(tcp_port_forward_server)
License
sevent uses the MIT license, see LICENSE file for the details.
Metadata
Release files for sevent 0.4.43
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 |
|---|---|---|---|---|
| sevent-0.4.43.tar.gz | 59.0 kB | Without provenance | Details for sevent-0.4.43.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| sevent-0.4.43-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details for sevent-0.4.43-cp314-cp314-win_amd64.whl |
| sevent-0.4.43-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details for sevent-0.4.43-cp313-cp313-win_amd64.whl |
| sevent-0.4.43-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for sevent-0.4.43-cp312-cp312-win_amd64.whl |
| sevent-0.4.43-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details for sevent-0.4.43-cp311-cp311-win_amd64.whl |
| sevent-0.4.43-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details for sevent-0.4.43-cp310-cp310-win_amd64.whl |
| sevent-0.4.43-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details for sevent-0.4.43-cp39-cp39-win_amd64.whl |
| sevent-0.4.43-cp38-cp38-win_amd64.whl | CPython 3.8 | CPython 3.8 | Windows x86-64 | Details for sevent-0.4.43-cp38-cp38-win_amd64.whl |
Total release size: 664.7 kB
Release files / sevent-0.4.43.tar.gz
| Download URL | sevent-0.4.43.tar.gz |
|---|---|
| Size | 59.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7cacafd0c2e4fb91eeb7b71d4c7c3859e6f41daa0c83273c7ebc73096b5f557
|
|
BLAKE2b-256 checksum How to use checksums |
04dc160ed8d056bd022c195b06472c631b332769d5b653c1f6812dfc6bfca9fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / sevent-0.4.43-cp314-cp314-win_amd64.whl
| Download URL | sevent-0.4.43-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 86.4 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a0b59daba3cc1129ca798e24d51030dda3175d09ff880cc5e66b2531dbf51335
|
|
BLAKE2b-256 checksum How to use checksums |
ded20985b883fb9843e09685fd2d8fd4dbee91c0fafe10f959f77fb2210d2e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / sevent-0.4.43-cp313-cp313-win_amd64.whl
| Download URL | sevent-0.4.43-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 86.6 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7e308c121944d80091f7f7fcd0f00e21c9ae4c3f59a0f90843dffb90ab432de9
|
|
BLAKE2b-256 checksum How to use checksums |
5355b72ad77f1a31ceec7577db8e2e8ea1218d61562ad81db682cf761d1bac63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / sevent-0.4.43-cp312-cp312-win_amd64.whl
| Download URL | sevent-0.4.43-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 86.6 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9f8ace22748019f5f756606a4edebe60f60ab82085384036e18ed71a9fc10abc
|
|
BLAKE2b-256 checksum How to use checksums |
73d1663fadc36e59860932d2b6cbea34469176cf0e855f9540407035828d3960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / sevent-0.4.43-cp311-cp311-win_amd64.whl
| Download URL | sevent-0.4.43-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 86.3 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d16539b0fc08b5a36ef142e7dc21f81492268143a2aaa9983e78698a55dcc0dd
|
|
BLAKE2b-256 checksum How to use checksums |
868caea2f3288184c41af65bef1988f906f37d43e4d337301b839f16013b4a45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / sevent-0.4.43-cp310-cp310-win_amd64.whl
| Download URL | sevent-0.4.43-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 86.3 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
43ad66e04bee2f37108c3287aba9f9d1ca76bf812a0770cac0da5c5c8911d6d2
|
|
BLAKE2b-256 checksum How to use checksums |
41d85e0d6556e0cccc52e6d4b19f32f36b6729134ac98d891b37b3f1ae88addb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / sevent-0.4.43-cp39-cp39-win_amd64.whl
| Download URL | sevent-0.4.43-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 86.6 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
83bfc48dd201f4e13277026b508d097afbef5f87361cf31a55196e6a0806a508
|
|
BLAKE2b-256 checksum How to use checksums |
43602f2d2c9eaf24d706a931ba85c9533d4e3bcf2b0b4e7ea732accb81aec55e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / sevent-0.4.43-cp38-cp38-win_amd64.whl
| Download URL | sevent-0.4.43-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 86.8 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1619ddd8f0395495f432392e8622ee047b29dc96f5ba75ded83aefd06e5dc7cc
|
|
BLAKE2b-256 checksum How to use checksums |
b63943f5ae3f4a96727e4ab10fec5542c10c60aa46a651001a2b158d700b7489
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Security for sevent 0.4.43
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.