{"id":17080567,"url":"https://github.com/kylef/irctk","last_synced_at":"2025-04-12T20:44:19.461Z","repository":{"id":19989644,"uuid":"23256881","full_name":"kylef/irctk","owner":"kylef","description":"A Python IRC client library","archived":false,"fork":false,"pushed_at":"2024-11-30T00:10:12.000Z","size":156,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T14:56:07.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://irctk.readthedocs.org/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylef.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/support.rst","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-23T13:49:48.000Z","updated_at":"2024-11-30T00:10:15.000Z","dependencies_parsed_at":"2025-01-11T16:33:29.119Z","dependency_job_id":"fb4b9e96-b28e-4f2c-a6dd-5a8d7978f005","html_url":"https://github.com/kylef/irctk","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Firctk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Firctk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Firctk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylef%2Firctk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylef","download_url":"https://codeload.github.com/kylef/irctk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631687,"owners_count":21136556,"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":[],"created_at":"2024-10-14T12:45:50.384Z","updated_at":"2025-04-12T20:44:19.432Z","avatar_url":"https://github.com/kylef.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"irc-toolkit\n===========\n\nAn IRC client toolkit in Python.\n\n## Installation\n\n```bash\n$ pip install irc-toolkit\n```\n\n## Usage\n\nThere are a few parts of irc-toolkit, depending on your goals.\n[`irctk.Message`](https://irctk.readthedocs.io/en/latest/message.html)\noffers IRC message parsing,\n[`irctk.Client`](https://irctk.readthedocs.io/en/latest/client.html) offers an\nIRC client which handles connection/channel/nick tracking giving you a callback\nbased interface for IRC messages, for example:\n\n```python\n#!/usr/bin/env python\n\nimport asyncio\nimport logging\n\nimport irctk\n\n\nclass Bot:\n    async def connect(self, hostname, port=6697, secure=True):\n        client = irctk.Client()\n        client.delegate = self\n        await client.connect(hostname, port, secure)\n\n    def irc_registered(self, client):\n        client.send('MODE', client.nick, '+B')\n        client.send('JOIN', '#test')\n\n    def irc_private_message(self, client, nick, message):\n        if message == 'ping':\n            client.send('PRIVMSG', nick, 'pong')\n\n    def irc_channel_message(self, client, nick, channel, message):\n        if message == 'ping':\n            client.send('PRIVMSG', channel, f'{nick}: pong')\n        elif message == 'quit':\n            client.quit()\n\n\nif __name__ == '__main__':\n    # Enable debug logging\n    logging.basicConfig(level='DEBUG')\n\n    bot = Bot()\n    asyncio.run(bot.connect('irc.darkscience.net'))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylef%2Firctk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylef%2Firctk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylef%2Firctk/lists"}