A Python SignalR Core client
Project description
SignalR core client
Example
Using package from aspnet core example chat without auth
from signalrcore.hub_connection import HubConnection
def input_with_default(input_text, default_value):
value = input(input_text.format(default_value))
return default_value if value is None or value.strip() == "" else value
server_url = input_with_default('Enter your server url(default: {0}): ', "ws://localhost:62342/chathub")
username = input_with_default('Enter your username (default: {0}): ', "mandrewcito")
# password = input_with_default('Enter your password (default: {0}): ', "Abc123.--123?")
hub_connection = HubConnection(server_url)
hub_connection.build()
hub_connection.on("ReceiveMessage", print)
hub_connection.start()
message = None
# Do login
while message != "exit()":
message = input(">> ")
if message is not None and message is not "" and message is not "exit()":
hub_connection.send("SendMessage", [username, message])
hub_connection.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
signalrcore-0.1.1.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file signalrcore-0.1.1.tar.gz
.
File metadata
- Download URL: signalrcore-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fad93c84da699280f3acf12bca78239e4f4ed50badf91a6eb31630c496810f5 |
|
MD5 | 86601fdb1e16e5b39db25ed7736474fa |
|
BLAKE2b-256 | c21777bfbcaa3024325a3299db05969478b12c9a629d42911853726d3e5c5fa4 |
File details
Details for the file signalrcore-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: signalrcore-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e51d5edcf24ab46256e000f9356de7ab3887cbea47da3f08da7f51a0545f8b |
|
MD5 | e2a6a4ff67125327ee5f8ebe57119566 |
|
BLAKE2b-256 | ed091b3e13419a9c0813c88747be81a5d8e566bb0de5038ece16842129ec0d0f |