{"id":16654107,"url":"https://github.com/aliartiza75/livecassandrareader","last_synced_at":"2026-04-26T09:32:15.830Z","repository":{"id":92726249,"uuid":"130895358","full_name":"aliartiza75/livecassandrareader","owner":"aliartiza75","description":"A script to read data from the Cassandra table in real time.","archived":false,"fork":false,"pushed_at":"2018-04-24T19:48:29.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T20:57:48.338Z","etag":null,"topics":["cassandra","cassandra-database","cassandra-reader","cassandra-table","python3"],"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/aliartiza75.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":"2018-04-24T18:09:33.000Z","updated_at":"2020-07-18T06:24:29.000Z","dependencies_parsed_at":"2023-03-30T05:20:19.651Z","dependency_job_id":null,"html_url":"https://github.com/aliartiza75/livecassandrareader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aliartiza75/livecassandrareader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliartiza75%2Flivecassandrareader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliartiza75%2Flivecassandrareader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliartiza75%2Flivecassandrareader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliartiza75%2Flivecassandrareader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliartiza75","download_url":"https://codeload.github.com/aliartiza75/livecassandrareader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliartiza75%2Flivecassandrareader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32292832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T08:29:33.829Z","status":"ssl_error","status_checked_at":"2026-04-26T08:29:18.366Z","response_time":129,"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":["cassandra","cassandra-database","cassandra-reader","cassandra-table","python3"],"created_at":"2024-10-12T09:48:41.883Z","updated_at":"2026-04-26T09:32:15.810Z","avatar_url":"https://github.com/aliartiza75.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# livecassandrareader\n\nA script to read data from the Cassandra table in real time.\n\n# Problem\n\nThe current version of the python-driver reads the data from the Cassandra table till a particular row but what if the table is updating in real-time, so in order to read the new data from a table we have to go through all the rows again.\n\nFor example:\n\nA **USER** table have 100 rows in it. So using the script below:\n```python\nself.session.default_fetch_size = 10\nresult_set = self.session.execute(\"SELECT * FROM testKeyspace.USER\")\n    while(result_set.has_more_pages):\n        for row in result_set.current_rows:\n            print(row)\n        page_state = result_set.paging_state\n        result_set = self.session.execute(\"SELECT * FROM test3rf.test\", paging_state=page_state)\n```\nwe will be able to read the cassandra table till 100th. After some time the **USER** table gets updated with two new rows. So in order to read the two new rows we have to go through all the other 100 rows which is inefficient. \n\n\n# How to use it\n\nIt supports both python2 \u0026 3 version.\n\nInstall the python cassandra driver using the command given below:\n\n```\n$ pip install cassandra-driver\n```\n\nLiveCassandraReader class need the following argument as an input:\n\n```\nconfigurations = {\n    \"cass_addr\": \"172.17.0.1\",\n    \"keyspace_name\": \"dataingestion\",\n    \"query\": \"SELECT * FROM dataingestion.power_source_status4\",\n    \"protocol_version\": 4,\n    \"retry\": 5,\n    \"retry_time\": 10,\n    \"default_fetch_size\": 1\n}\n```\n\nTo run the script\"\n```\n$ python livecassandrareader.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliartiza75%2Flivecassandrareader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliartiza75%2Flivecassandrareader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliartiza75%2Flivecassandrareader/lists"}