Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianlesko/py-net-sockets
This code implements wireless socket communication between a server and client - written in pure python with a user interface for both computers. To recreate what ive done here you'll need two laptops and a network to communicate over. Make sure your IP addresses and subnet masks are correct and networkable.
https://github.com/brianlesko/py-net-sockets
communication computers jammy-jellyfish linux low-code mac macos mechanical-engineer network networking ohio-state prototyping python robotics robotics-engineer sockets ubuntu user-interface wifi wireless
Last synced: about 1 month ago
JSON representation
This code implements wireless socket communication between a server and client - written in pure python with a user interface for both computers. To recreate what ive done here you'll need two laptops and a network to communicate over. Make sure your IP addresses and subnet masks are correct and networkable.
- Host: GitHub
- URL: https://github.com/brianlesko/py-net-sockets
- Owner: BrianLesko
- License: mit
- Created: 2023-12-17T19:33:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-28T23:02:10.000Z (about 1 year ago)
- Last Synced: 2024-11-06T23:33:08.650Z (3 months ago)
- Topics: communication, computers, jammy-jellyfish, linux, low-code, mac, macos, mechanical-engineer, network, networking, ohio-state, prototyping, python, robotics, robotics-engineer, sockets, ubuntu, user-interface, wifi, wireless
- Language: Python
- Homepage:
- Size: 7.63 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Py-net
Socket Stream(lit)
This code implements wireless TCP socket communication between a server and client - written in pure python with a user interface for both computers. To recreate what ive done here you'll need two laptops and a network to communicate over. Make sure your IP addresses and subnet masks are correct and networkable.![Preview](docs/preview.png)
## Local Computer Dependencies
This code uses the following libraries:
- `streamlit`: For creating the user interface
- `socket`: For handling the system level communication hardware
## Run this demo yourself
Clone the repository on two computers and install the necessary dependencies using pip. Next, run the streamlit apps in a terminal in the directory of the repositories
on the server computer:
```
streamlit run server.py
```on the client computer:
```
streamlit run client.py
```
## How it Works
The app as follows:
1. The server waits for a connection
2. The client connects to the server
3. The client waits for text input from the user
4. The client send the user data to the server
5. The server displays the data as text and responds with a received message
6. The server continually waits for another message
7. The client saves the socket connection but reruns and only displays the most recent message and server response
## Topics
```
Python | Wifi | wireless communication | sockets | TCP | networking
decode bytes | communication | custom classes
Self taught coding | Mechanical engineer | Robotics engineer
Brian Lesko | Brian Joseph Lesko
```
╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮
┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃
┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃
┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃
┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃
╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯
follow all of these or i will kick you