{"id":25052341,"url":"https://github.com/yuhexiong/kafka-timestamp-fetch-api-python-flask","last_synced_at":"2026-05-03T06:37:06.837Z","repository":{"id":273961994,"uuid":"920924239","full_name":"yuhexiong/kafka-timestamp-fetch-api-python-flask","owner":"yuhexiong","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-03T03:22:08.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T06:16:31.574Z","etag":null,"topics":["apache-kafka","flask","kafka","python"],"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/yuhexiong.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":"2025-01-23T02:30:22.000Z","updated_at":"2025-02-03T03:22:11.000Z","dependencies_parsed_at":"2025-01-24T02:28:15.701Z","dependency_job_id":"807b1b47-2d91-442a-af50-63e0e3fa1f50","html_url":"https://github.com/yuhexiong/kafka-timestamp-fetch-api-python-flask","commit_stats":null,"previous_names":["yuhexiong/kafka-timestamp-fetch-api-python-flask"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuhexiong/kafka-timestamp-fetch-api-python-flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fkafka-timestamp-fetch-api-python-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fkafka-timestamp-fetch-api-python-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fkafka-timestamp-fetch-api-python-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fkafka-timestamp-fetch-api-python-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuhexiong","download_url":"https://codeload.github.com/yuhexiong/kafka-timestamp-fetch-api-python-flask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fkafka-timestamp-fetch-api-python-flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32560901,"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":["apache-kafka","flask","kafka","python"],"created_at":"2025-02-06T10:29:18.846Z","updated_at":"2026-05-03T06:37:06.813Z","avatar_url":"https://github.com/yuhexiong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kafka Timestamp Fetch API\n\n**(also provided Traditional Chinese version document [README-CH.md](README-CH.md).)**\n\nProvides an API to fetch messages from Kafka based on a specified timestamp range.\n\n## Overview\n\n- Language: Python v3.12\n- Web Framework: Flask v2.2.5\n- Kafka Tool: kafka-python-ng v2.0.3\n\n## Run\n\n```bash\npython app.py\n```\nThe Flask service will be available at `localhost:5000`.  \n\n\n## API\n- POST /kafka/fetch\n\nExample request:\n```json\n{\n    \"bootstrap_servers\": \"localhost:9092\",\n    \"topic\": \"my_topic\",\n    \"start_time\": \"2025-01-18 00:00:00\",\n    \"end_time\": \"2025-01-20 00:00:00\"\n}\n```\n\nExample response:\n```json\n{\n    \"data\": [\n        {\n            \"partition\": 0,\n            \"messages\": [\n                {\n                    \"offset\": 100,\n                    \"value\": \"Message A\",\n                    \"timestamp\": \"2025-01-18 00:00:00\"\n                },\n                {\n                    \"offset\": 101,\n                    \"value\": \"Message B\",\n                    \"timestamp\": \"2025-01-18 00:01:00\"\n                }\n            ]\n        }\n    ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhexiong%2Fkafka-timestamp-fetch-api-python-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuhexiong%2Fkafka-timestamp-fetch-api-python-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhexiong%2Fkafka-timestamp-fetch-api-python-flask/lists"}