Python generic server implementation, with predefined request-answer pairs and different modes (e.g, 'normal', 'no response', 'fail test1')
Project description
Generic-Server
Python generic server implementation, with configurable request-response modules (e.g, 'ok', 'reflect', 'json').
Status: Beta
Authors: Carsten König
Purpose
For testing different network components in a lab environment, some components in the network might not be available. In order to simulate their presence, Generic-Server answers TCP or UDP string requests using modules either with pre-defined responses or simulated behaviour.
Installation
pip install generic-server
How to use
In order to start a Generic-Server, start the server with the desired config:
genericserver <protocol> <responder>
protocol: either TCP or UDP
responder: one out of 'ok', 'reflect', 'manual' or 'json'
ok: Always sends 'ok' as an answer.
reflect: Reflects the request string back to the sender.
manual: Prompts the user to manually enter an answer.
json: Get answers from a json document. For nested json, a delimiter
can be chosen (default ':').
Example:
{"test": {
"a": "1",
"b": 2
}
}
Request: test:a
Response: 1
License
Author
Carsten König
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for generic_server-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66ed406399de88959c88e4bb88e6dceffab03a22f35dd4e2ecd54ed34cd9a14d |
|
MD5 | 5225e359a1e58770034597aa2c6eb2dc |
|
BLAKE2b-256 | b48dd4726712f40da08bd1a2018fd337f423efd1c9bb8dc8466fcd5e776640e9 |