Skip to main content

EasyCommunications (EComs): easy handling of communication between python scripts

This library is a light-weight support for connecting different python scripts via TCP

Installation

The minimal required python version is Python3.6. The easiest installation can be done by pip3 install EasyCommunications.

Getting started

Once installed, just import the package by import ecoms. For exchanging data between two endpoints (the scripts), one must be the master and the other one the slave. The master must open the connection first for the slave to connect to it. Once the scripts are connected, communication is completely bi-directional.

Master

Initialize the communication and send "abc" as payload to the slave and wait infinitely until answering:
master = EasyCommunicationMaster(some_port)
master.send(payload="abc")
data = master.wait_until_receiving()

Slave

Initialize the communication and echo received payload "abc":
slave = EasyCommunicationSlave(master_ip, master_port)
data = slave.wait_until_receiving()
slave.send(statusCode=200, payload=data.payload)

Quickstart tip

In /tests there is an example master echoing everything sent to from localhost.
Just fire it up for testing with python3 tests/echo_master.py port.

Documentation

For further guidance and help look at the documentation

Requests & contribution

If you desire anything changed in the package or need another feature please just create an issue.

I am happy for everybody wanting to contribute. Simplest way is to start writing issues, forking the repository and contacting me ;)

Release files for EasyCommunications 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for EasyCommunications 0.1.5
File Size Uploaded
EasyCommunications-0.1.5.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for EasyCommunications 0.1.5
File Interpreter ABI Platform
EasyCommunications-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 kB

Release files / EasyCommunications-0.1.5.tar.gz

Download URL EasyCommunications-0.1.5.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b52af9b12dc0db8a67d02e1a57a024fa034ccf38fecdb8c9de4b170b84b127d2
BLAKE2b-256 checksum
How to use checksums
fef440f05ac7deeb1dec919ea769dda610d4991bc1f437ee0a41ee9caa4688fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.7

Release files / EasyCommunications-0.1.5-py3-none-any.whl

Download URL EasyCommunications-0.1.5-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
176b6a11ef4e47b0b195e4c49553b4700fabc526142d7c80f8646d87ed57b657
BLAKE2b-256 checksum
How to use checksums
6d9c255e4c91cc566864b40a2871c7098490790a5a727f2382422f7b30fe98dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page