Basic but fast network communication between scientific applications
Project description
py-hi-tension, hi-tension for Python
py-hi-tension
is a Python module designed for basic but fast network
communication between scientific applications, backed by
hi-tension
. The focus is on
transferring large unsized arrays of f64
with maximum throughput and minimum
latency. More informations to be found in hi-tension
's github
page.
Usage
Using the library is quite simple:
# Connect to a server
socket = HiTensionSocket.connect("127.0.0.1:34487")
# You can make such a server though the following line:
# socket = HiTensionSocket.accept("127.0.0.1:34487")
# Send a simple text message
socket.send(b"status\n")
# Receive a simple text message
text_data = socket.read()
# Send formatted data as simple text message
id = 1
msg = f"do_something {id + 1}\n"
socket.send(msg.encode())
# Send formatted data and receive a high tension message
msg = f"fly {id}\n"
socket.send(msg.encode())
array = socket.hiread() # array is a numpy array
# Send the array back as a high tension message
socket.hisend(array)
socket.hidelimiter()
# You can send the array back
socket.hisend(array)
socket.hidelimiter()
# You may send your data in multible packets
socket.hisend(array[:10])
socket.hisend(array[10:])
socket.hidelimiter()
# This is useful for example if you are calculating your data while
# transferring it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hi_tension-0.1.0.tar.gz
(4.8 kB
view hashes)
Built Distributions
hi_tension-0.1.0-cp36-abi3-win32.whl
(131.1 kB
view hashes)
Close
Hashes for hi_tension-0.1.0-cp36-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8476194eb7f711eff02fcc797e7629102188fac232734b8a1cab95b525ea7556 |
|
MD5 | b4b4842d1acc29d591c761e32a58a2de |
|
BLAKE2b-256 | 5be18c52c77e9bbb2b1a3e8412a069e8da19c0c8cb0cab105dcf633801886896 |
Close
Hashes for hi_tension-0.1.0-cp36-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fda515e40ab9cf392b2a46661882ffee321a1b2f4a958c187086d671303acf05 |
|
MD5 | 7af150ef419090ce10fd32216fa06995 |
|
BLAKE2b-256 | b7f362a757307f04ef1ffd0f6a694c2ed810435947586669f78f7289322ab134 |
Close
Hashes for hi_tension-0.1.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 066ebf598f71b51aaa8e74dad363d7412d6792f423949e9bcdd5fabcba55b420 |
|
MD5 | e02fea6bf0d9f28bfe32f83324add9ef |
|
BLAKE2b-256 | 25dae28e4432d63dbd6461a33394fca90f922fbbe46d0950d0b061ee7a186663 |
Close
Hashes for hi_tension-0.1.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf59698f44e1892c242aabde6e06cc882ae45287f126b76e13662b5a52e4706 |
|
MD5 | 9cdf0214593814e9f9184700626e79d3 |
|
BLAKE2b-256 | 1ce836381cfeaef8fa265b9a0e479e0837374321e9ee67dfa6f24170f2a95932 |
Close
Hashes for hi_tension-0.1.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2934b6ab97892c0c0fb6d53b067bb4d04eb05a2d479f59c957168b61c4add6d4 |
|
MD5 | c8d3cd5b3b9a5aa7b904b48fec5e2b05 |
|
BLAKE2b-256 | 098c1c2c6aed85cb8859c5cd0c18d352c2a1ec58d02cfc638c0fc5639bfd7340 |
Close
Hashes for hi_tension-0.1.0-cp36-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1670b7088c7c5682a1cd179d1b851292701648182adfba4f9dbfc92151a31619 |
|
MD5 | 5117b79c15b23e0ea6853218b439aa57 |
|
BLAKE2b-256 | 3fe45464d121582ca46ecd49332722c0f508ab0f88d576379163ca7132d6dd61 |
Close
Hashes for hi_tension-0.1.0-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ab7c4d8d01b161ff736281d04034c36da30aa41bab188372803e001ec420407 |
|
MD5 | c56ba11e6fcd86cae03889fd4cf262ce |
|
BLAKE2b-256 | 021a6a4020ee3eff7f98476ea6e315bec1667e6c4a42fe3a2a78f635144472eb |