{"id":20957066,"url":"https://github.com/akhaled01/py-utils","last_synced_at":"2026-05-03T21:32:30.267Z","repository":{"id":227228053,"uuid":"770819868","full_name":"akhaled01/py-utils","owner":"akhaled01","description":"This Repository contains sample code for some python utilities","archived":false,"fork":false,"pushed_at":"2024-05-16T20:50:08.000Z","size":441,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T07:16:56.106Z","etag":null,"topics":["csv","ip","json","nginx","osi","python","socket","tcp","udp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akhaled01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-12T08:12:57.000Z","updated_at":"2024-08-03T13:29:34.000Z","dependencies_parsed_at":"2024-03-27T08:54:01.868Z","dependency_job_id":"1e55b525-f4dd-459b-a52a-7f7def82b120","html_url":"https://github.com/akhaled01/py-utils","commit_stats":null,"previous_names":["akhaled01/itne352-lab-1","akhaled01/itne352-lab","akhaled01/py-utils"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akhaled01/py-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhaled01%2Fpy-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhaled01%2Fpy-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhaled01%2Fpy-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhaled01%2Fpy-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akhaled01","download_url":"https://codeload.github.com/akhaled01/py-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhaled01%2Fpy-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32586187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["csv","ip","json","nginx","osi","python","socket","tcp","udp"],"created_at":"2024-11-19T01:29:26.561Z","updated_at":"2026-05-03T21:32:30.246Z","avatar_url":"https://github.com/akhaled01.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-server\n\n![python](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge\u0026logo=python\u0026logoColor=blue) ![nginx](https://img.shields.io/badge/Nginx-009639?style=for-the-badge\u0026logo=nginx\u0026logoColor=white) ![json](https://img.shields.io/badge/json-5E5C5C?style=for-the-badge\u0026logo=json\u0026logoColor=white) ![apache](https://img.shields.io/badge/Apache-D22128?style=for-the-badge\u0026logo=Apache\u0026logoColor=white)\n\nThis project is a multithreaded TCP file server. A file server is any type of server that recives requests and serves files. Multithreading has been used to ensure multiple clients can connect at the same time. Good coding practices have been adhered to.\n\nThis Project tries to mimic some of `nginx`/`apache` functionality, but it is too \"simple\" for it to do so. It also tries to use HTTP-like syntax to communicate between server and client\n\n## Steps For running the project\n\n\u003e It is preferable to use Linux OS for running this project\n\n1. First, initialize a new virtualenv by running `python -m venv lab_env`\n2. in the terminal, run `activate` if you are on `powershell`\n   * If you are on `bash`/`zsh`, `cd lab_env`, then run `source bin/activate`\n3. run `pip install -r requirements.txt`\n4. if you are on linux, give the run script proper permissions by running `chmod 777 run.py`\n   * If you are on windows, execute the script in an with admin privileges and allow firewall bypass\n5. To run the TCP server, execute `python run.py server`\n6. To run the TCP client, execute `python run.py client`\n\n\u003e It should be noted that `internal/files` houses the files served by the server, while `internal/client_files` houses the files requested by the client\n\n## Libraries Used\n\n1. `socket` for TCP socket utilities\n2. `subprocess` for executing processes\n3. `os` for file and dir manipulation\n4. `sys` for handling system events gracefully\n5. `json` for data serialization across sockets\n6. `rich` for good terminal UI\n\n### Done by Abdulrahman Idrees - 202200729\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhaled01%2Fpy-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakhaled01%2Fpy-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhaled01%2Fpy-utils/lists"}