Detailed documentation
aio.manhole.server
Manhole server for the aio asyncio framework
Build status
Installation
Requires python >= 3.4
Install with:
pip install aio.manhole.server
Quick start - Manhole server
Save the following into a file “manhole.conf”
[server/my_manhole_server]
factory = aio.manhole.server.factory
port = 7373
Run with the aio run command
aio run -c manhole.conf
You should now be able to telnet into the running server on port 7373
aio.manhole.server usage
Configuration
Lets create a manhole configuration
>>> config = """ ... [aio] ... log_level = ERROR ... ... [server/server_name] ... factory = aio.manhole.server.factory ... port = 7373 ... ... """
>>> import sys >>> import io >>> import aiomanhole
>>> import aio.testing >>> import aio.app >>> from aio.app.runner import runner
When we run the manhole server, its accessible as “server_name” from aio.app.servers
>>> @aio.testing.run_forever(sleep=1) ... def run_manhole_server(config): ... yield from runner(['run'], config_string=config) ... ... def call_manhole(): ... print(aio.app.servers["server_name"]) ... aio.app.clear() ... ... return call_manhole
>>> run_manhole_server(config)
<Server sockets=[<socket.socket ...laddr=('0.0.0.0', 7373)...>
Lets try calling the manhole server
>>> import asyncio >>> import telnetlib3
>>> @aio.testing.run_forever(sleep=1) ... def run_manhole_server(config): ... yield from runner(['run'], config_string=config) ... ... class TestTelnetClient(telnetlib3.TelnetClient): ... ... def data_received(self, data): ... print(data) ... ... def call_manhole(): ... loop = asyncio.get_event_loop() ... transport, protocol = yield from loop.create_connection( ... TestTelnetClient, "127.0.0.1", 7373) ... aio.app.clear() ... ... return call_manhole
>>> run_manhole_server(config) b'hello...\n>>> '
Metadata
Release files for aio.manhole.server 0.0.2
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 |
|---|---|---|---|---|
| aio.manhole.server-0.0.2.tar.gz | 3.1 kB | Without provenance | Details for aio.manhole.server-0.0.2.tar.gz |
Release files / aio.manhole.server-0.0.2.tar.gz
| Download URL | aio.manhole.server-0.0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c85edc251a759441c93ba23a4b38dc4b96e954991d783ef2b06c36c517c35a3
|
|
BLAKE2b-256 checksum How to use checksums |
bf9197150fee8d29b027dac8abf5f6f97af7cf6c514801ff0388b0c569420a4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for aio.manhole.server 0.0.2
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.