{"id":24017673,"url":"https://github.com/yanruijie902136/codecrafters-kafka-python","last_synced_at":"2026-01-28T06:32:31.464Z","repository":{"id":257500787,"uuid":"857778422","full_name":"yanruijie902136/codecrafters-kafka-python","owner":"yanruijie902136","description":"My Python solution to CodeCrafters' Build your own Kafka challenge (18 stages).","archived":false,"fork":false,"pushed_at":"2025-03-28T09:26:08.000Z","size":113,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T10:28:22.392Z","etag":null,"topics":["codecrafters","codecrafters-kafka","kafka","python"],"latest_commit_sha":null,"homepage":"https://app.codecrafters.io/courses/kafka/introduction","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/yanruijie902136.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-09-15T15:35:31.000Z","updated_at":"2025-03-28T09:26:11.000Z","dependencies_parsed_at":"2024-11-10T00:21:02.496Z","dependency_job_id":"2513a718-9aa0-41f6-a5ff-119b2c08eaa7","html_url":"https://github.com/yanruijie902136/codecrafters-kafka-python","commit_stats":null,"previous_names":["yanruijie902136/codecrafters-kafka-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanruijie902136%2Fcodecrafters-kafka-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanruijie902136%2Fcodecrafters-kafka-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanruijie902136%2Fcodecrafters-kafka-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanruijie902136%2Fcodecrafters-kafka-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanruijie902136","download_url":"https://codeload.github.com/yanruijie902136/codecrafters-kafka-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804208,"owners_count":21806769,"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":["codecrafters","codecrafters-kafka","kafka","python"],"created_at":"2025-01-08T09:42:31.661Z","updated_at":"2026-01-28T06:32:26.441Z","avatar_url":"https://github.com/yanruijie902136.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![progress-banner](https://backend.codecrafters.io/progress/kafka/7fbf4b67-c371-4b45-9755-6d3ea457ef49)](https://app.codecrafters.io/users/codecrafters-bot?r=2qF)\n\nThis is a starting point for Python solutions to the\n[\"Build Your Own Kafka\" Challenge](https://codecrafters.io/challenges/kafka).\n\nIn this challenge, you'll build a toy Kafka clone that's capable of accepting\nand responding to APIVersions \u0026 Fetch API requests. You'll also learn about\nencoding and decoding messages using the Kafka wire protocol. You'll also learn\nabout handling the network protocol, event loops, TCP sockets and more.\n\n**Note**: If you're viewing this repo on GitHub, head over to\n[codecrafters.io](https://codecrafters.io) to try the challenge.\n\n# Passing the first stage\n\nThe entry point for your Kafka implementation is in `app/main.py`. Study and\nuncomment the relevant code, and push your changes to pass the first stage:\n\n```sh\ngit commit -am \"pass 1st stage\" # any msg\ngit push origin master\n```\n\nThat's all!\n\n# Stage 2 \u0026 beyond\n\nNote: This section is for stages 2 and beyond.\n\n1. Ensure you have `python (3.x)` installed locally\n1. Run `./your_program.sh` to run your Kafka broker, which is implemented in\n   `app/main.py`.\n1. Commit your changes and run `git push origin master` to submit your solution\n   to CodeCrafters. Test output will be streamed to your terminal.\n\n# Troubleshooting\n\n## module `socket` has no attribute `create_server`\n\nWhen running your server locally, you might see an error like this:\n\n```\nTraceback (most recent call last):\n  File \"/.../python3.7/runpy.py\", line 193, in _run_module_as_main\n    \"__main__\", mod_spec)\n  File \"/.../python3.7/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/app/app/main.py\", line 11, in \u003cmodule\u003e\n    main()\n  File \"/app/app/main.py\", line 6, in main\n    s = socket.create_server((\"localhost\", 6379), reuse_port=True)\nAttributeError: module 'socket' has no attribute 'create_server'\n```\n\nThis is because `socket.create_server` was introduced in Python 3.8, and you\nmight be running an older version.\n\nYou can fix this by installing Python 3.8 locally and using that.\n\nIf you'd like to use a different version of Python, change the `language_pack`\nvalue in `codecrafters.yml`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanruijie902136%2Fcodecrafters-kafka-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanruijie902136%2Fcodecrafters-kafka-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanruijie902136%2Fcodecrafters-kafka-python/lists"}