webrcon


Namewebrcon JSON
Version 1.0.7 PyPI version JSON
download
home_pagehttps://github.com/lewdneko/webrcon
SummaryBasic async interface for Rust's WebRcon protocol
upload_time2020-09-30 12:10:05
maintainer
docs_urlNone
authorlewdneko
requires_python>=3.6
licenseBlueOak-1.0.0
keywords rust webrcon rcon websockets ws rust_game async
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WebRcon Package

## Install
`pip install webrcon`<br>
or<br>
`pip install https://github.com/lewdneko/webrcon/archive/master.zip`

## Docs

#### webrcon.RconConnector(host, port, password, message_callback=None, console_callback=None)
Initialises the class<br>
`host: str` - the IP/hostname of the server accepting WebRcon<br>
`port: Union[str, int]` - the port the server is accepting WebRcon on<br>
`password: str` - the password used to connect over WebRcon<br>
`message_callback: func` - a sync or async function that is called whenever a chat message is sent<br>
`console_callback: func` - a sync or async function that is called whenever a console message is sent<br>

##### <i>await</i> RconConnector.start(loop, **kwargs)
Opens a connection to the server<br>
`loop` - an asyncio event loop, can be obtained through asyncio.get_event_loop()<br>
`kwargs` - passed to websockets.client.connect - [read the docs](https://websockets.readthedocs.io/en/stable/api.html#websockets.client.connect)<br>

##### <i>await</i> RconConnector.close()
Closes the connection to the server

##### <i>await</i> RconConnector.command(command, callback)
Sends a command over RCON to the server<br>
`command: str` - The command you want to be sent to the server<br>
`callback: func` - A sync/async function that should take a single argument. The passed value will be a dict consisting of the output from the RCON server.<br>The response to your command will be under the `Message` key.

#### webrcon.InvalidServer
Your host/port/password combination is incorrect or the server isn't running.

#### webrcon.ConnectionClosed
You closed the connection and still tried to send a command. Good one.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lewdneko/webrcon",
    "name": "webrcon",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "rust webrcon rcon websockets ws rust_game async",
    "author": "lewdneko",
    "author_email": "",
    "download_url": "",
    "platform": "Windows",
    "description": "# WebRcon Package\n\n## Install\n`pip install webrcon`<br>\nor<br>\n`pip install https://github.com/lewdneko/webrcon/archive/master.zip`\n\n## Docs\n\n#### webrcon.RconConnector(host, port, password, message_callback=None, console_callback=None)\nInitialises the class<br>\n`host: str` - the IP/hostname of the server accepting WebRcon<br>\n`port: Union[str, int]` - the port the server is accepting WebRcon on<br>\n`password: str` - the password used to connect over WebRcon<br>\n`message_callback: func` - a sync or async function that is called whenever a chat message is sent<br>\n`console_callback: func` - a sync or async function that is called whenever a console message is sent<br>\n\n##### <i>await</i> RconConnector.start(loop, **kwargs)\nOpens a connection to the server<br>\n`loop` - an asyncio event loop, can be obtained through asyncio.get_event_loop()<br>\n`kwargs` - passed to websockets.client.connect - [read the docs](https://websockets.readthedocs.io/en/stable/api.html#websockets.client.connect)<br>\n\n##### <i>await</i> RconConnector.close()\nCloses the connection to the server\n\n##### <i>await</i> RconConnector.command(command, callback)\nSends a command over RCON to the server<br>\n`command: str` - The command you want to be sent to the server<br>\n`callback: func` - A sync/async function that should take a single argument. The passed value will be a dict consisting of the output from the RCON server.<br>The response to your command will be under the `Message` key.\n\n#### webrcon.InvalidServer\nYour host/port/password combination is incorrect or the server isn't running.\n\n#### webrcon.ConnectionClosed\nYou closed the connection and still tried to send a command. Good one.\n\n",
    "bugtrack_url": null,
    "license": "BlueOak-1.0.0",
    "summary": "Basic async interface for Rust's WebRcon protocol",
    "version": "1.0.7",
    "split_keywords": [
        "rust",
        "webrcon",
        "rcon",
        "websockets",
        "ws",
        "rust_game",
        "async"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "6ccbad5c91b7d3ed3c51df56c9fae316",
                "sha256": "b68e4763bcd9264dbd74deb32799565a35da30d0c0753b1635f234f64d79dee7"
            },
            "downloads": -1,
            "filename": "webrcon-1.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6ccbad5c91b7d3ed3c51df56c9fae316",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5606,
            "upload_time": "2020-09-30T12:10:05",
            "upload_time_iso_8601": "2020-09-30T12:10:05.170697Z",
            "url": "https://files.pythonhosted.org/packages/3c/94/28961e31007ec6a12f02362c39aa5cded23baf900f4f32170f1ca007d1ac/webrcon-1.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-09-30 12:10:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "lewdneko",
    "error": "Could not fetch GitHub repository",
    "lcname": "webrcon"
}
        
Elapsed time: 0.12975s