generic-server


Namegeneric-server JSON
Version 1.1.3 PyPI version JSON
download
home_page
SummaryPython generic TCP/UDP server implementation, with configurable request-response modules (e.g, 'ok', 'reflect', 'json').
upload_time2023-02-03 19:57:54
maintainer
docs_urlNone
authorCarsten König
requires_python>=3.10
licenseGNU GPLv3 License
keywords mock testing integration tests server simulator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Generic-Server

Python generic TCP/UDP server implementation, with configurable request-response modules (e.g, 'ok', 'reflect', 'json').

**Status:**  Beta\
**Authors:** Carsten König

## Purpose

Sometimes you need a TCP or UDP server that answers with a specific strings to a given request.  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

```bash
pip install generic-server
```

## How to use
In order to start a Generic-Server, start the server with the desired config:

```bash
genericserver <protocol> <port> <responder>
```

**protocol**: either TCP or UDP \
**port**: port to listen on \
**responder**: one out of 'ok', 'reflect', 'manual' or 'json'

<ul>

**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:

```json 
{"test": {
        "a": "1",
        "b": 2
        }
}
```

Request:  `test:a`\
Response: `1`
</ul>

## License
[GNU GPLv3 License](https://choosealicense.com/licenses/gpl-3.0/)

## Author
**Carsten König**

- [GitLab](https://gitlab.com/ck2go "Carsten König")
- [GitHub](https://github.com/ck2go "Carsten König")
- [LinkedIn](https://www.linkedin.com/in/ck2go/ "Carsten König")
- [Website](https://www.carsten-koenig.de "Carsten König")


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "generic-server",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "mock,testing,Integration tests,server,simulator",
    "author": "Carsten K\u00f6nig",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/50/be/fdc29b68e5c61166db7a16d2ff768cca54f03023ec1cde2101446ae1853b/generic-server-1.1.3.tar.gz",
    "platform": null,
    "description": "# Generic-Server\n\nPython generic TCP/UDP server implementation, with configurable request-response modules (e.g, 'ok', 'reflect', 'json').\n\n**Status:**  Beta\\\n**Authors:** Carsten K\u00f6nig\n\n## Purpose\n\nSometimes you need a TCP or UDP server that answers with a specific strings to a given request.  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. \n\n## Installation\n\n```bash\npip install generic-server\n```\n\n## How to use\nIn order to start a Generic-Server, start the server with the desired config:\n\n```bash\ngenericserver <protocol> <port> <responder>\n```\n\n**protocol**: either TCP or UDP \\\n**port**: port to listen on \\\n**responder**: one out of 'ok', 'reflect', 'manual' or 'json'\n\n<ul>\n\n**ok**:         Always sends 'ok' as an answer.\\\n**reflect**:    Reflects the request string back to the sender.\\\n**manual**:     Prompts the user to manually enter an answer.\\\n**json**:       Get answers from a json document. For nested json, a delimiter\n            can be chosen (default ':').\\\n            Example:\n\n```json \n{\"test\": {\n        \"a\": \"1\",\n        \"b\": 2\n        }\n}\n```\n\nRequest:  `test:a`\\\nResponse: `1`\n</ul>\n\n## License\n[GNU GPLv3 License](https://choosealicense.com/licenses/gpl-3.0/)\n\n## Author\n**Carsten K\u00f6nig**\n\n- [GitLab](https://gitlab.com/ck2go \"Carsten K\u00f6nig\")\n- [GitHub](https://github.com/ck2go \"Carsten K\u00f6nig\")\n- [LinkedIn](https://www.linkedin.com/in/ck2go/ \"Carsten K\u00f6nig\")\n- [Website](https://www.carsten-koenig.de \"Carsten K\u00f6nig\")\n\n",
    "bugtrack_url": null,
    "license": "GNU GPLv3 License",
    "summary": "Python generic TCP/UDP server implementation, with configurable request-response modules (e.g, 'ok', 'reflect', 'json').",
    "version": "1.1.3",
    "split_keywords": [
        "mock",
        "testing",
        "integration tests",
        "server",
        "simulator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a108111b81e3c28979b94a71474ac78395e2cadb7ec9875d7a7edfa8ca51f658",
                "md5": "b92e91165aebc4b6b159c767400abb6c",
                "sha256": "1dcc4d38afd1bd278c1fc6a619f1c9f6111e9c9056daed3bd4551ef9d2269f3d"
            },
            "downloads": -1,
            "filename": "generic_server-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b92e91165aebc4b6b159c767400abb6c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 24210,
            "upload_time": "2023-02-03T19:57:52",
            "upload_time_iso_8601": "2023-02-03T19:57:52.747353Z",
            "url": "https://files.pythonhosted.org/packages/a1/08/111b81e3c28979b94a71474ac78395e2cadb7ec9875d7a7edfa8ca51f658/generic_server-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "50befdc29b68e5c61166db7a16d2ff768cca54f03023ec1cde2101446ae1853b",
                "md5": "e9e8aeee5493496cae8cc5b019756622",
                "sha256": "89469a79bcd36fbb34099d95427eb58ab81d9f3458941cc2cc055b979e6d5b1d"
            },
            "downloads": -1,
            "filename": "generic-server-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e9e8aeee5493496cae8cc5b019756622",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 20522,
            "upload_time": "2023-02-03T19:57:54",
            "upload_time_iso_8601": "2023-02-03T19:57:54.801200Z",
            "url": "https://files.pythonhosted.org/packages/50/be/fdc29b68e5c61166db7a16d2ff768cca54f03023ec1cde2101446ae1853b/generic-server-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-03 19:57:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "generic-server"
}
        
Elapsed time: 0.13372s