Pyjo-Reactor-Asyncio
Low level event reactor with asyncio support for Pyjoyment.
Pyjoyment
An asynchronous, event driver web framework for the Python programming language.
Pyjoyment provides own reactor which handles I/O and timer events in its own main event loop but it supports other loops, ie. libev or asyncio.
asyncio
This module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives.
The asyncio module was designed in PEP3156. For a motivational primer on transports and protocols, see PEP3153.
Trollius
Trollius is a portage of the asyncio project (PEP3156) on Python 2. Trollius works on Python 2.6-3.5.
Examples
Non-blocking TCP client/server
import Pyjo.Reactor.Asyncio
import Pyjo.IOLoop
# Listen on port 3000
@Pyjo.IOLoop.server(port=3000)
def server(loop, stream, cid):
@stream.on
def read(stream, chunk):
# Process input chunk
print("Server: {0}".format(chunk.decode('utf-8')))
# Write response
stream.write(b"HTTP/1.1 200 OK\x0d\x0a\x0d\x0a")
# Disconnect client
stream.close_gracefully()
# Connect to port 3000
@Pyjo.IOLoop.client(port=3000)
def client(loop, err, stream):
@stream.on
def read(stream, chunk):
# Process input
print("Client: {0}".format(chunk.decode('utf-8')))
# Write request
stream.write(b"GET / HTTP/1.1\x0d\x0a\x0d\x0a")
# Add a timer
@Pyjo.IOLoop.timer(3)
def timeouter(loop):
print("Timeout")
# Shutdown server
loop.remove(server)
# Start event loop
Pyjo.IOLoop.start()
Metadata
Release files for Pyjo-Reactor-Asyncio 0.0.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 | |
|---|---|---|---|---|
| Pyjo-Reactor-Asyncio-0.0.1.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Pyjo_Reactor_Asyncio-0.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 12.9 kB
Release files / Pyjo-Reactor-Asyncio-0.0.1.tar.gz
| Download URL | Pyjo-Reactor-Asyncio-0.0.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
289da0cceb271f23b27cb2b6cc8f9ce3311acc361e98ba13f240481d825cbac3
|
|
BLAKE2b-256 checksum How to use checksums |
e4bee70cbb7cf044de743701380abcb2304874d298184e10233ac4f52c8a431e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / Pyjo_Reactor_Asyncio-0.0.1-py2.py3-none-any.whl
| Download URL | Pyjo_Reactor_Asyncio-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fe0c1b2fb14a518eed73d57e00e1d36ab9682b3c0a058baff41ebf7a7c2437b5
|
|
BLAKE2b-256 checksum How to use checksums |
744f3b32edd7bb940c921ae228fed68c5b6861230865d2ef34192bc0486d04cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Pyjo-Reactor-Asyncio 0.0.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.