{"id":17011371,"url":"https://github.com/noooway/clickstream_events_specification_cerberus","last_synced_at":"2026-05-18T03:02:45.652Z","repository":{"id":192252433,"uuid":"591874483","full_name":"noooway/clickstream_events_specification_cerberus","owner":"noooway","description":"Clickstream events specification and validation with Cerberus","archived":false,"fork":false,"pushed_at":"2023-01-25T18:07:32.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-06T00:41:35.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/noooway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-22T06:59:20.000Z","updated_at":"2023-01-22T07:05:32.000Z","dependencies_parsed_at":"2023-09-03T18:59:46.697Z","dependency_job_id":null,"html_url":"https://github.com/noooway/clickstream_events_specification_cerberus","commit_stats":null,"previous_names":["noooway/clickstream_events_specification_cerberus"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/noooway/clickstream_events_specification_cerberus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noooway%2Fclickstream_events_specification_cerberus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noooway%2Fclickstream_events_specification_cerberus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noooway%2Fclickstream_events_specification_cerberus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noooway%2Fclickstream_events_specification_cerberus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noooway","download_url":"https://codeload.github.com/noooway/clickstream_events_specification_cerberus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noooway%2Fclickstream_events_specification_cerberus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278788304,"owners_count":26045941,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-14T06:06:54.238Z","updated_at":"2025-10-07T14:24:50.507Z","avatar_url":"https://github.com/noooway.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Clickstream events [specification and validation](https://github.com/noooway/clickstream_events_specification_cerberus/blob/main/clickstream_events_spec_and_validation.ipynb) with [Cerberus](https://docs.python-cerberus.org/en/stable/index.html)\n\n```python\nfrom datetime import datetime\nfrom cerberus import Validator\n\npayment_btn_click_scheme = {\n    'dt': {'type': 'datetime', 'coerce': lambda x: datetime.strptime(x,'%Y-%m-%d %H:%M:%S')},\n    'device_id': {'type': 'string'},\n    'user_id': {'type': 'integer'},\n    'name': {'type': 'string', 'allowed': ['payment_btn_click']},\n    'order_id': {'type': 'integer'}\n}\nv = Validator(payment_btn_click_scheme, require_all=True)\n\npayment_btn_click_events = [\n    {\n        #ok\n        'dt': '2023-01-10 12:23:01',\n        'device_id': 'abc123-efg456',\n        'user_id': 1231231,\n        'name': 'payment_btn_click',\n        'order_id': 101010\n    },\n    {\n        #missing order_id\n        'dt': '2023-01-10 12:23:01',\n        'device_id': 'abc123-efg456',\n        'user_id': 1231231,\n        'name': 'payment_btn_click'\n    },\n    {\n        #wrong user_id type\n        'dt': '2023-01-10 12:23:01',\n        'device_id': 'abc123-efg456',\n        'user_id': '1231231',\n        'name': 'payment_btn_click',\n        'order_id': 101010\n    }\n]\n\nfor i,e in enumerate(payment_btn_click_events):\n    if v.validate(e):\n        print(f'{i}: ok')\n    else:\n        print(f'{i}: {v.errors}')\n\n# 0: ok\n# 1: {'order_id': ['required field']}\n# 2: {'user_id': ['must be of integer type']}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoooway%2Fclickstream_events_specification_cerberus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoooway%2Fclickstream_events_specification_cerberus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoooway%2Fclickstream_events_specification_cerberus/lists"}