This tool is aimed to provide simple and customizable interface for communication between different services over sockets. No encryption yet.
Simple example:
Client:
from crosservice.signals import BaseSignal
class PingSignal(BaseSignal):
_host = '127.0.0.1'
_port = 5555
signal = 'ping'
expect_data = ['time']
if __name__ == '__main__':
ping = PingSignal({'foo': 'bar'})
if ping.result:
print ping.result.foo, ':', ping.result.time
else:
print "Error: ", ping.result.error
Server:
from crosservice.server import start_server
from crosservice.handlers import BaseHandler
import time
class PingHandler(BaseHandler):
signal = 'ping'
required_data = ['foo']
def run(self, foo):
if foo == 'bar':
foo = 'received at'
self.result.foo = foo
self.result.time = time.time()
else:
self.result.error = 'Bad foo!'
if __name__ == '__main__':
start_server('127.0.0.1', 5555, 1000)
Metadata
Release files for crosservice 0.2.15
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 | Actions |
|---|---|---|---|---|
| crosservice-0.2.15.tar.gz | 18.8 kB | Without provenance | Details for crosservice-0.2.15.tar.gz |
Release files / crosservice-0.2.15.tar.gz
| Download URL | crosservice-0.2.15.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc5f8236fd2f1c4705b6c5e7ebfdb1cc16c8e5987e53c8fbc4289e005192e1ef
|
|
BLAKE2b-256 checksum How to use checksums |
e9b63e652c92a0642d5d32966dc51146a087709b5fefca87dcc015a3636793f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for crosservice 0.2.15
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.