{"id":20046003,"url":"https://github.com/deepakjha01/localchat","last_synced_at":"2025-03-02T07:47:21.450Z","repository":{"id":62576548,"uuid":"279474105","full_name":"DeepakJha01/localchat","owner":"DeepakJha01","description":"Python Library to help build a local area network multiple client chat system quickly and easily.","archived":false,"fork":false,"pushed_at":"2020-07-20T04:42:36.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-12T23:14:17.838Z","etag":null,"topics":["chat","chatapp","client","group-chat","local-area-network","localchat","pypi","pypi-package","python","server","socket"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/localchat/","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/DeepakJha01.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","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":"2020-07-14T03:43:58.000Z","updated_at":"2020-09-09T02:35:50.000Z","dependencies_parsed_at":"2022-11-03T19:07:41.661Z","dependency_job_id":null,"html_url":"https://github.com/DeepakJha01/localchat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepakJha01%2Flocalchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepakJha01%2Flocalchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepakJha01%2Flocalchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepakJha01%2Flocalchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepakJha01","download_url":"https://codeload.github.com/DeepakJha01/localchat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241476436,"owners_count":19968916,"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","chatapp","client","group-chat","local-area-network","localchat","pypi","pypi-package","python","server","socket"],"created_at":"2024-11-13T11:20:10.995Z","updated_at":"2025-03-02T07:47:21.418Z","avatar_url":"https://github.com/DeepakJha01.png","language":"Python","readme":"# localchat\n\nLocalchat is a python library that helps setup server side and client side scripts of a Local Area Network Group Chat in no time.\nThis library makes it very easy to share messages to all the devices connected on the same LAN.\n\n## Installation\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install localchat\n```bash\npip install localchat\n```\n\n## Requirements\n- Python 3 - Download [here](https://www.python.org/downloads/)\n- socket library (pre-installed with python package)\n- threading library (pre-installed with python package)\n\n## Usage \n```python\nimport localchat\nlocalchat.help()\n```\nCalling help will list out all the details of the library.\n```\nlocalchat :: python library for quickly writing server and client side programs for a Chat Group on LAN\n    Follow the below instructions to use this library\n\n    Localchat library is pre-initialized with the following values of the GLOBAL variables\n    PORT (port number) = 9999,                    FORMAT (encoding format) = 'utf-8'\n    DISCONNECT_MSG (client disconnects on typing this message) = '!CONNECT'     \n    HEADER (buffer size to send the size of the message) = 64\n    \n    1. initialize(port,format,header,disconnect_msg)    -   to change any of the pre-initialized global variables\n                                                            (should be same for server and client)\n                                                            \n    2. start_server()   -   binds the server with its (IP, PORT) and gets ready to accept multiple clients requests,\n                            receive messages and broadcast the messages to all the client available\n    \n    3. start_client(server_ip)   -   connects the client with the server ipv4 address provided and gets ready to send\n                                     and receive messages concurrently\n    \n    4. send_message(client, message)   -    server can send the message to the client OR\n                                            client can send message to the connected server       \n    \n    5. receive_msg(client)  -   server can receive message from the client OR\n                                client can receive message from the connected server\n    \n    6. broadcast(message)   -   server broadcasts the message to all the available clients(ALL_CLIENTS)\n    \nWill be adding new features soon ...\n```\n\n## Sample Server Side Code\n```python\nimport localchat\n\nlocalchat.initialize(port = 9090, format = 'utf-8', disconnect_msg = 'disconnect')\nlocalchat.start_server()\n```\n\n## Sample Client Side Code\n```python\nimport localchat\n\nlocalchat.initialize(port = 9090, format = 'utf-8', disconnect_msg = 'disconnect')\nserver_ip = '111.111.11.11'     # for example\n                                # ipv4 address of the server system (see below to find ipv4 address)\nlocalchat.start_client(server_ip)\n```\n\n## How to find IPv4 address of any system\n- run ipconfig command in command-promt and copy the IPv4 address under the ```Wireless LAN adapter Wi-Fi``` section\n```bash\n$ ipconfig\n```\n\n## Note\nThe following arguments of the server and the client SHOULD BE SAME during ```.initialize```\n- The ```port``` number\n- The message encoding ```format``` \n- The ```disconnect_msg```\n- The ```header``` (variable to send the size of the message) \n\n## Contributions\nYou are welcome to contribute via pull requests on [GitHub](https://github.com/DeepakJha01/localchat)\n\n## Version\nStable Version - 1.1.0\n\n## License\n[MIT](https://github.com/DeepakJha01/localchat/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakjha01%2Flocalchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepakjha01%2Flocalchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakjha01%2Flocalchat/lists"}