Mini Observer Network
####Painfully Simple Subscriber Publisher network. Default encoding is JSON, optional encoding for raw bytes
###1. Start the server use the -port #### -length # -encode (option) as arguments
1.-length # is the size of the header for length of the message
2.-encode (type) JSON or bytes
###2. Create Nodes in your code. tnode = miniOJN.Node(server_ip_str, port_number) ###3. Subscribe to topics tnode.subscribe("generic topic name") ###4. Use the Nodes to read from topics and publish to them
publish to a topic
tnode.publish("generic topic name", "hello world")
check out many items are waiting to be read
tnode.status()
read the items
topic, info = tnode.read()
At the moment
Only supported encoding are JSON and bytes. The message length header is variable. These numbers and encodings must be consistent throughout the network.
Q&A
The topics do not record history (Once a message is read it pops off the queue AND nodes don't get messages from before connection.)
The Nodes are anonymous (they don't have verified names)
Nodes will receive things they publish if they are subscribed to them.
There is no encryption (yet), It hurts being able to port miniOJN to other languages. (but will be added as an option)
####the packets are easy to decode for other languages, mostly.
Every packet starts with N(4) digits that represent it's length. so a message cannot be over 10kb (by default) The Packets are JSON or bytes after that. The word SUBSCRIBE as a string is used for subscribing to topics by a node.
That's it folks
Name server (optional utility)
I had a need for mobile and network config independent servers on a lan. To this end I decided on this extension.
- Start up the name_server.py on a known reliable address
- Start up your servers using the -name (server_name) and -ns (ip_for_name_server)
- use host, port = mobnet.Nameservice.lookup(name)
- connect your node to the host and port received
Metadata
Release files for mobnet 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mobnet-1.0-py3-none-any.whl | Python 3 | none | any | Details for mobnet-1.0-py3-none-any.whl |
Release files / mobnet-1.0-py3-none-any.whl
| Download URL | mobnet-1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f064dd99cdf4d9b00fec4e4e09ff86638fa15e3908cab8445c477d49e07dc4b8
|
|
BLAKE2b-256 checksum How to use checksums |
c8aa2cb48c2f7fd6a8f51e9808beda2fea411add016c385a2f5cef0381e828c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for mobnet 1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.