Github can be found here
Setup
pip install yaps
CLI tools
To use the executables, ensure that yaps is installed which should put yaps-publish, yaps-subscribe and yaps-server available your path.
CLI Publish
yaps-publish --topic weather --message "Very cold today!"
CLI Subscribe
yaps-publish --topic weather
Python API
The client can be used either asynchronous or synchronous.
Publish Synchronous
from yaps.client import Client
client = Client('127.0.0.1', 8999)
client.publish(topic='weather', message='Very cold today!')
Subscribe Synchronous
from yaps.client import Client
client = Client('127.0.0.1', 8999)
client.subscribe(topic='weather',
data_received=lambda msg: print(f'New data: {msg}'))
Publish Asynchronous
import asyncio
from yaps.client import AsyncClient
client = AsyncClient('127.0.0.1', 8999)
asyncio.run(client.publish(topic='weather', message='Very cold today!'))
Subscribe Asynchronous
import asyncio
from yaps.client import AsyncClient
client = AsyncClient('127.0.0.1', 8999)
callback = lambda msg: print(f'New data: {msg}')
asyncio.run(client.subscribe(topic='test',
data_received=callback))
Server (Asynchronous only)
import asyncio
from yaps.server import Server
server = Server('127.0.0.1', 8999)
asyncio.run(server.start())
Logging
Logging is enabled by default and can be disabled by calling disable() on either a client or server.
You can set the logging level by calling set_loglevel(string) with either a string, or an int directly from the logging module.
Logging output is by default directed to both stdin and a log file, located at ~/.yaps on Unix systems (not 100% sure where this is located in Windows).
Metadata
Release files for yaps-lib 0.0.1
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 | |
|---|---|---|---|---|
| yaps-lib-0.0.1.tar.gz | 15.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yaps_lib-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.2 kB
Release files / yaps-lib-0.0.1.tar.gz
| Download URL | yaps-lib-0.0.1.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
635a84228d3a752a0bbd22f9404311007a75d2621328e2738265f0622d4a5bae
|
|
BLAKE2b-256 checksum How to use checksums |
084706e70600e77ae29ff74c12ef698c8a6729b587ef4326b8de15762e1a7b0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
|
Release files / yaps_lib-0.0.1-py3-none-any.whl
| Download URL | yaps_lib-0.0.1-py3-none-any.whl |
|---|---|
| Size | 24.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
597ff477591978db37c2e04490a2e0b13405011ee19da62cd89444ef9f81991a
|
|
BLAKE2b-256 checksum How to use checksums |
7609d83cede3f090e62074021c02efa2eb300ba149dd11dc61ebc9d8a2b44fe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
|
Security for yaps-lib 0.0.1
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.