{"id":18020706,"url":"https://github.com/inforkgodara/python-chat-application","last_synced_at":"2025-06-16T22:32:14.876Z","repository":{"id":110250096,"uuid":"286093561","full_name":"inforkgodara/python-chat-application","owner":"inforkgodara","description":"It is a simple python socket-based chat application where communication established between a single server and client.","archived":false,"fork":false,"pushed_at":"2020-08-09T19:04:34.000Z","size":8,"stargazers_count":18,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T10:11:54.490Z","etag":null,"topics":["chat","chatbot","inforkgodara","python","python-chat","python-chat-application","python-chatbot","python-chatroom","python-script","python-socket","pythonchatapplication","pythonsocket","realtime","realtime-","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inforkgodara.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":"2020-08-08T17:59:49.000Z","updated_at":"2025-03-14T17:27:13.000Z","dependencies_parsed_at":"2023-04-04T01:32:26.840Z","dependency_job_id":null,"html_url":"https://github.com/inforkgodara/python-chat-application","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/inforkgodara/python-chat-application","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inforkgodara%2Fpython-chat-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inforkgodara%2Fpython-chat-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inforkgodara%2Fpython-chat-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inforkgodara%2Fpython-chat-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inforkgodara","download_url":"https://codeload.github.com/inforkgodara/python-chat-application/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inforkgodara%2Fpython-chat-application/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260251407,"owners_count":22981030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chat","chatbot","inforkgodara","python","python-chat","python-chat-application","python-chatbot","python-chatroom","python-script","python-socket","pythonchatapplication","pythonsocket","realtime","realtime-","socket","socket-programming"],"created_at":"2024-10-30T06:07:23.155Z","updated_at":"2025-06-16T22:32:14.847Z","avatar_url":"https://github.com/inforkgodara.png","language":"Python","readme":"# Python Chat Application\n\nIt is a simple project and contains two python scripts server.py which handle client request and client.py send request and receive response from the server through socket communication.\n\n## Prerequisites\n\nIn order to run the python script, your system must have the following programs/packages installed and the contact number should be saved in your phone (You can use bulk contact number saving procedure of email). There is a way without saving the contact number but has the limitation to send the attachment.\n* Python 3.8\n\n## Approach\n* server.py needed to execute in terminal. \n* client.py needed to execute from the client machine and enter the hostname or IP address.\n* the server will establish connection between the server and the client through socket.\n* now from the server or client text can be sent.\n\n## Server Code\n```\n# Program to accept client request\n# Author @inforkgodara\n\nimport socket\n\ns = socket.socket()\nhost = socket.gethostname()\nprint(' Server will start on host : ', host)\nport = 8080\ns.bind((host, port))\nprint()\nprint('Waiting for connection')\nprint()\ns.listen(1)\nconn, addr = s.accept()\nprint(addr, ' Has connected to the server')\nprint()\nwhile 1:\n    message = input(str('\u003e\u003e '))\n    message = message.encode()\n    conn.send(message)\n    print('Sent')\n    print()\n    incoming_message = conn.recv(1024)\n    incoming_message = incoming_message.decode()\n    print(' Client : ', incoming_message)\n    print()\n```\n## Client Code\n```\n# Program to send request to the server\n# Author @inforkgodara\n\nimport socket\n\ns = socket.socket()\nhost = input(str('Enter hostname or host IP : '))\nport = 8080\ns.connect((host, port))\nprint('Connected to chat server')\nwhile 1:\n    incoming_message = s.recv(1024)\n    incoming_message = incoming_message.decode()\n    print(' Server : ', incoming_message)\n    print()\n    message = input(str('\u003e\u003e '))\n    message = message.encode()\n    s.send(message)\n    print('Sent')\n    print()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finforkgodara%2Fpython-chat-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finforkgodara%2Fpython-chat-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finforkgodara%2Fpython-chat-application/lists"}