{"id":34045070,"url":"https://github.com/simplyrohan/simple-socket","last_synced_at":"2026-03-09T20:06:28.625Z","repository":{"id":62592482,"uuid":"504843830","full_name":"simplyrohan/simple-socket","owner":"simplyrohan","description":"Python module for communicating with sockets","archived":false,"fork":false,"pushed_at":"2022-06-20T15:55:58.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-05-22T23:16:45.091Z","etag":null,"topics":["communication","package","python","simple","socket","socket-programming"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplyrohan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-18T12:55:34.000Z","updated_at":"2022-06-20T15:57:35.000Z","dependencies_parsed_at":"2022-11-03T22:58:11.950Z","dependency_job_id":null,"html_url":"https://github.com/simplyrohan/simple-socket","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/simplyrohan/simple-socket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyrohan%2Fsimple-socket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyrohan%2Fsimple-socket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyrohan%2Fsimple-socket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyrohan%2Fsimple-socket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplyrohan","download_url":"https://codeload.github.com/simplyrohan/simple-socket/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyrohan%2Fsimple-socket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["communication","package","python","simple","socket","socket-programming"],"created_at":"2025-12-13T23:03:54.820Z","updated_at":"2026-03-09T20:06:28.614Z","avatar_url":"https://github.com/simplyrohan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# simple-socket\nPython module for communicating with sockets\n\n\n## About\n\nWhen I first started with sockets in Python, I was looking all over the place for how to use them. This package is a high level version of the built-in socket package. It takes care of threads and binary encoding.  \n\nMy hopes for this project in the future are:\n - Image sharing\n - Sound sharing\n - File sharing\n - Automatic buffer size\n\n ## Installation\n\n ```bash\n git clone  https://github.com/simplyrohan/simple-socket.git\n\n--or--\n\npip install simple-pysocket\n ``` \n\n## Usage\n### Server Side\n```python\nimport simple_socket\n\n\n# Initilize Socket. This will do many things at once:\n#  - Initilize low-level socket\n#  - Automaticly connect as server or client (unless type is specified already)\n#  - Defines threads and other socket dependencies\nsock = simple_socket.Socket(\"localhost\", 5000)\n\n# Set handler for incoming connections. Is not neccesary if you only need to listen to sockets as connections will automatically be handled\n@sock.set_on_connect\ndef on_connect(conn):\n    print(\"Connected!\")\n    conn.send(\"Hello!\")\n\n# Set handler for incoming data, which is also not necessary if you only need to send data to sockets\n@sock.set_on_recv\ndef on_recv(data):\n    print(data)\n\n# Program loop has different contents depending on whether or not the script is server-side or client-side.\n# Server-side programs call the method to accept incoming connections and create a thread for them\nwhile True:\n    sock.accept()\n\n# Close main socket and all other connections when program loop is interrupted\nsock.close()\n\n```\nFor more, go to [Examples](https://github.com/simplyrohan/simple-socket/tree/main/Examples)\n\n## Contibutes\nI'm open to contributes! If you know any features that can be implemented or simply found a bug, I'll gladly merge a pull request!\n\n## Notes\nI'm still relativley new to sockets and for that matter, the entire Python language. So if you are running into an issue, please report an issue, as this package is not nearly complete.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplyrohan%2Fsimple-socket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplyrohan%2Fsimple-socket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplyrohan%2Fsimple-socket/lists"}