Skip to main content

easy-tcp-python2-3

  • easy socket programming between python 2 and 3 without compatibility issues
  • receive and send the list, json or image via pickle and cv2 (jpeg)

Dependencies

Installation

$ pip install easy_tcp_python2_3

Usage

  • send a sample list and image from a server to client
# server
from easy_tcp_python2_3 import socket_utils as su
import numpy as np
sock, add = su.initialize_server('localhost', 7777)
sample_list = [1, 2]
print("Send list:, sample_list)
su.sendall_pickle(sock, sample_list)
sample_image = np.uint8(np.zeros([480, 640]))
print("Send image:, sample_image.shape)
su.sendall_image(sock, sample_image)

# client
from easy_tcp_python2_3 import socket_utils as su
sock = su.initialize_client('localhost', 7777)
recv_list = su.recvall_pickle(sock)
print("Received list:", recv_list)
recv_image = su.recvall_image(sock)
print("Received image:"recv_image.shape)

Authors

License

This project is licensed under the MIT License

Metadata

Release files for easy-tcp-python2-3 0.0.1.0

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

Built distributions (wheels)

Table of built distributions (wheels) for easy-tcp-python2-3 0.0.1.0
File Interpreter ABI Platform Actions
easy_tcp_python2_3-0.0.1.0-py3-none-any.whl Python 3 none any Details for easy_tcp_python2_3-0.0.1.0-py3-none-any.whl
easy_tcp_python2_3-0.0.1.0-py2-none-any.whl Python 2 none any Details for easy_tcp_python2_3-0.0.1.0-py2-none-any.whl

Total release size: 5.8 kB

Release files / easy_tcp_python2_3-0.0.1.0-py3-none-any.whl

Download URL easy_tcp_python2_3-0.0.1.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99fcc50a828e1812338fd7803d4d684925d99a92b33e5136b5561be87ea4bc74
BLAKE2b-256 checksum
How to use checksums
1cd016a155e6c8b67367c5473c6dec28e853d18de1b494294ddc4c387f96c1d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/2.7.17

Release files / easy_tcp_python2_3-0.0.1.0-py2-none-any.whl

Download URL easy_tcp_python2_3-0.0.1.0-py2-none-any.whl
Size 2.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
71caa97660074a952da8d1d796efe1915e4fa3b636c9675ae5995965f880c38e
BLAKE2b-256 checksum
How to use checksums
f7d7fd6fd06addf6b726e1e0c1524c7cb4533f5e0b555f1e4e3641ac4ecd4a4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/2.7.17

Security for easy-tcp-python2-3 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.1.0 This release

2 release files No provenance

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