{"id":26964652,"url":"https://github.com/disrupted/kafka-clickfraud-python","last_synced_at":"2025-07-04T01:04:52.261Z","repository":{"id":74456122,"uuid":"292962264","full_name":"disrupted/kafka-clickfraud-python","owner":"disrupted","description":"Kafka streams App built in Python using Faust library","archived":false,"fork":false,"pushed_at":"2020-09-11T13:58:24.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-04T01:03:55.969Z","etag":null,"topics":["apache-kafka","faust","kafka-streams"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/disrupted.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,"zenodo":null}},"created_at":"2020-09-04T23:00:47.000Z","updated_at":"2020-09-11T13:58:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d458c7f-b21d-44d9-93e7-426093738f5d","html_url":"https://github.com/disrupted/kafka-clickfraud-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/disrupted/kafka-clickfraud-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disrupted%2Fkafka-clickfraud-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disrupted%2Fkafka-clickfraud-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disrupted%2Fkafka-clickfraud-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disrupted%2Fkafka-clickfraud-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disrupted","download_url":"https://codeload.github.com/disrupted/kafka-clickfraud-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disrupted%2Fkafka-clickfraud-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263427300,"owners_count":23464842,"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":["apache-kafka","faust","kafka-streams"],"created_at":"2025-04-03T06:34:27.591Z","updated_at":"2025-07-04T01:04:52.228Z","avatar_url":"https://github.com/disrupted.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kafka-clickfraud-python\n\u003e Kafka App calculating a \"click fraud\" score based on an incoming stream of click events indicating fake clicks by bots\n\nBuilt in Python using the [Faust](https://github.com/robinhood/faust) stream processing library.\n\n## Example input topic\n\n```json\n{\n  \"cookie\": \"879e134ede5a46798187e655b5435c2d\", \n  \"campId\": \"foo\", \n  \"isFake\": 0, \n  \"timestamp\": \"2020-09-11T10:53:09.810150Z\"\n}\n{\n  \"cookie\": \"10cb2ef94b9641aeb901976a1b4817da\", \n  \"campId\": \"bar\", \n  \"isFake\": 1, \n  \"timestamp\": \"2020-09-11T10:53:15.823862Z\"\n}\n{\n  \"cookie\": \"0b4e5785c82740ef987bc985f2c9196c\", \n  \"campId\": \"bar\", \n  \"isFake\": 0, \n  \"timestamp\": \"2020-09-11T10:53:33.843298Z\"\n}\n```\n\n## Example output topic\n\n```json\n{\n  \"campaign\": \"foo\",\n  \"clickFraud\": 0.15\n}\n{\n  \"campaign\": \"bar\",\n  \"clickFraud\": 0.32\n}\n{\n  \"campaign\": \"bar\",\n  \"clickFraud\": 0.32\n}\n```\n\n## Installation\n\nClone the repository, navigate inside it and install faust dependency\n\n```sh\ngit clone https://github.com/disrupted/kafka-clickfraud-python\ncd kafka-clickfraud-python\npip install -U faust\n```\n\nrequires Python 3.7 or later\n\n## Usage\n\nStart the Zookeeper \u0026 Kafka server stack\n\n```sh\ndocker-compose up\n```\n\nOpen a separate shell and start the app\n\n```sh\npython3 faustapp.py worker -l info\n```\n\nUse `kafka-console-consumer` or another client to subscribe to the Kafka topics `streams-clickfraud-input` and `streams-clickfraud-output` to monitor the randomly generated Click events and the calculated Click fraud score as messages from the application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisrupted%2Fkafka-clickfraud-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisrupted%2Fkafka-clickfraud-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisrupted%2Fkafka-clickfraud-python/lists"}