{ "info": { "author": "HashData", "author_email": "wang@hashdata.cn", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "python-tidb-replication\n========================\n\n[![Build Status](https://travis-ci.org/HashDataInc/pytidbrep.svg?branch=master)](https://travis-ci.org/HashDataInc/pytidbrep)\n\nPure Python Implementation of Tidb replication protocol. This allow you to receive event like insert, update, delete with their datas and raw SQL queries.\n\nUse cases\n===========\n\n* Tidb to NoSQL database replication\n* Tidb to search engine replication\n* Invalidate cache when something change in database\n* Audit\n* Real time analytics\n\nDocumentation\n==============\n\nTODO\n\nInstallation\n=============\n\n```\npip install pytidbrep\n```\n\nMailing List\n==============\n\nYou can get support and discuss about new features on:\nhttps://groups.google.com/forum/#!forum/tidb-user\n\n\n\nExamples\n=========\n\n\nThis example will dump all replication events to the console:\n\n```python\nfrom pytidbrep import BinLogStreamReader\n\nstream = BinLogStreamReader('/path/to/binlog/dir')\n\nfor binlogevent in stream:\n print binlogevent\n\nstream.close()\n```\n\nFor this SQL sessions:\n\n```sql\nCREATE DATABASE test;\nuse test;\nCREATE TABLE test4 (id int NOT NULL AUTO_INCREMENT, data VARCHAR(255), data2 VARCHAR(255), PRIMARY KEY(id));\nINSERT INTO test4 (data,data2) VALUES (\"Hello\", \"World\");\nUPDATE test4 SET data = \"World\", data2=\"Hello\" WHERE id = 1;\nDELETE FROM test4 WHERE id = 1;\n```\n\nOutput will be:\n\n```\n391018326269895930: DDL: CREATE DATABASE test;\n391018326269895973: DDL: use test; CREATE TABLE test4 (id int NOT NULL AUTO_INCREMENT, data VARCHAR(255), data2 VARCHAR(255), PRIMARY KEY(id));\n391018326269896003: DML: INSERT test.test4: data \"Hello\", id 1, data2 \"World\", \n391018326269896009: DML: UPDATE test.test4: data \"Hello\" => \"World\", id 1 => 1, data2 \"World\" => \"Hello\", \n391018326269896018: DML: DELETE test.test4: data \"World\", id 1, data2 \"Hello\", \n```\n\n\nTests\n========\nuse `tox` to run unit tests\n\n\nChangelog\n==========\n[ChangeLog](https://github.com/HashDataInc/pytidbrep/blob/master/ChangeLog)\n\n\nContributors\n==============\n\nMajor contributor:\n\n* [Zhanwei Wang](https://github.com/wangzw)\n\n\nLicence\n=======\nCopyright 2012-2017 HashData Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.hashdata.cn/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pytidbrep", "package_url": "https://pypi.org/project/pytidbrep/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytidbrep/", "project_urls": { "Homepage": "http://www.hashdata.cn/" }, "release_url": "https://pypi.org/project/pytidbrep/1.0.6/", "requires_dist": null, "requires_python": "", "summary": "Python TiDB binlog replication", "version": "1.0.6" }, "last_serial": 2913141, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "d61663a26b9806682ab2b2beb03a3dd3", "sha256": "e86833c8ec250fc43bcac83731a95df45233de0359ef2389acae50b5d8a04fdb" }, "downloads": -1, "filename": "pytidbrep-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d61663a26b9806682ab2b2beb03a3dd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27077, "upload_time": "2017-04-13T08:28:01", "url": "https://files.pythonhosted.org/packages/13/b8/3f08fa25d16daac797b2f92e4252402e2b9aeaaaeecf633ccf551049584d/pytidbrep-1.0.0.tar.gz" } ], "1.0.0.0rc1": [], "1.0.0.0rc2": [ { "comment_text": "", "digests": { "md5": "6126f0d58e754e86a25b5bb6be48caf8", "sha256": "dbdd0d6a79161230a86b8f6d608d9a15d2cc9954f2c8eba7350b12e0744005ec" }, "downloads": -1, "filename": "pytidbrep-1.0.0.0rc2.tar.gz", "has_sig": false, "md5_digest": "6126f0d58e754e86a25b5bb6be48caf8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27038, "upload_time": "2017-04-12T06:52:23", "url": "https://files.pythonhosted.org/packages/e4/38/a8a156a0f6d35395160354292b46916147a046bac83e8a6a5537a8545551/pytidbrep-1.0.0.0rc2.tar.gz" } ], "1.0.0.0rc3": [ { "comment_text": "", "digests": { "md5": "e4f29366e333714e616bca9e39701b1b", "sha256": "14d0872c69c8edccd7c21d84e2ff989983d152131107c81fbb16fbd0b2ce1396" }, "downloads": -1, "filename": "pytidbrep-1.0.0.0rc3.tar.gz", "has_sig": false, "md5_digest": "e4f29366e333714e616bca9e39701b1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26896, "upload_time": "2017-04-12T07:06:43", "url": "https://files.pythonhosted.org/packages/4a/8a/57a4fb41fcd017bca71373329b98e773297a82ce7d68dccf16409cf760d0/pytidbrep-1.0.0.0rc3.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b63591abe70a1bf6af864cc95e0aa147", "sha256": "af3fe6fa641ba8964b1dbd0636343b1ad13ed98bc0b280e5adb336ec9d50da2f" }, "downloads": -1, "filename": "pytidbrep-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b63591abe70a1bf6af864cc95e0aa147", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27100, "upload_time": "2017-04-20T01:56:35", "url": "https://files.pythonhosted.org/packages/6e/95/1ce89caf83e5aa67dc83ec2c00b4c8c7071240305b6b3d135e8aaf14c40c/pytidbrep-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "bce2b125a4bc0bf7c48189d15a2196fb", "sha256": "b18b854decc54a1a10a452919c4572f3c51aec700eb2d7c33f1b3b043b947f77" }, "downloads": -1, "filename": "pytidbrep-1.0.2.tar.gz", "has_sig": false, "md5_digest": "bce2b125a4bc0bf7c48189d15a2196fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27117, "upload_time": "2017-05-03T04:23:21", "url": "https://files.pythonhosted.org/packages/9c/5a/3efc48a0ac37ffcc70eada0fda96cad6bc5986c3c3e407f513e1b9b561d2/pytidbrep-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "38e15b337c7bd31763ab923e39bdf776", "sha256": "787ed32c0012ea1a4adade4ffd5906fd2010fab1121a9ecda4b32f8d942d33cb" }, "downloads": -1, "filename": "pytidbrep-1.0.3.tar.gz", "has_sig": false, "md5_digest": "38e15b337c7bd31763ab923e39bdf776", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27282, "upload_time": "2017-05-07T03:41:42", "url": "https://files.pythonhosted.org/packages/50/94/4ad9eafd8dd86c2fec796bb6fcb7b14b5d1e8d1574c80111feae9265c7ab/pytidbrep-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "f4e735b25fa485cf12730fbc87212ea1", "sha256": "8c24b1dbbad2748fa4d63d77393ffe52500941570189bf46533e03961268ed7f" }, "downloads": -1, "filename": "pytidbrep-1.0.4.tar.gz", "has_sig": false, "md5_digest": "f4e735b25fa485cf12730fbc87212ea1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27398, "upload_time": "2017-05-07T16:19:06", "url": "https://files.pythonhosted.org/packages/57/61/ba975edbbc3020ede30f45a67011fd55949cddf911d35ad1bc68834c2fca/pytidbrep-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "ea15a9713544aab45bfdb770c3c6c355", "sha256": "6f686509ed176191790084c952a7bfa6314504a901800457bb7b124b302d1c1d" }, "downloads": -1, "filename": "pytidbrep-1.0.5.tar.gz", "has_sig": false, "md5_digest": "ea15a9713544aab45bfdb770c3c6c355", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27420, "upload_time": "2017-05-07T17:02:23", "url": "https://files.pythonhosted.org/packages/f8/13/448afae0357e7cf2b6afbd403be83cb69f3b31f11b4f7e420cc73bf972b6/pytidbrep-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "2f23c6381504baa55a514cb16cb5e0dd", "sha256": "ee0f05d12c79c13ad5db37a82cbfb1b2c7d9be020ef11f8d292faa6cfea2c247" }, "downloads": -1, "filename": "pytidbrep-1.0.6.tar.gz", "has_sig": false, "md5_digest": "2f23c6381504baa55a514cb16cb5e0dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27430, "upload_time": "2017-05-31T10:54:57", "url": "https://files.pythonhosted.org/packages/c5/55/712394b3fafd3ed10ca8c98a78e10ef474cae0bd89f8c4204107308cd777/pytidbrep-1.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f23c6381504baa55a514cb16cb5e0dd", "sha256": "ee0f05d12c79c13ad5db37a82cbfb1b2c7d9be020ef11f8d292faa6cfea2c247" }, "downloads": -1, "filename": "pytidbrep-1.0.6.tar.gz", "has_sig": false, "md5_digest": "2f23c6381504baa55a514cb16cb5e0dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27430, "upload_time": "2017-05-31T10:54:57", "url": "https://files.pythonhosted.org/packages/c5/55/712394b3fafd3ed10ca8c98a78e10ef474cae0bd89f8c4204107308cd777/pytidbrep-1.0.6.tar.gz" } ] }