{ "info": { "author": "chuangwang", "author_email": "nashuiliang@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Pymysqlslave\n============\n\nSQLAlchemy Simple Master Slave Load Balancing(***beta***)\n\nYou can install Pymysqlslave from PyPI with\n\n.. sourcecode:: bash\n\n $ pip install pymysqlslave\n\n\nVersion update\n--------------\n\n- 1.0.6 [BUG]MySQLDBSlave open retry not avaliable\n- 1.0.5 [BUG]MySQLDBSlave slaves unavailable. modify MySQLDBSlave reconnect_retry_nums default => 3\n- 1.0.3 add is_auto_allocation(Automatic Identification master and slave)\n- 1.0.1 initialize project\n\n\nGetting Started\n---------------\n\n.. sourcecode:: python\n\n #!/usr/bin/env python\n # coding=utf-8\n\n import logging\n logging.basicConfig(level=logging.DEBUG)\n from sqlalchemy import select\n\n from pymysqlslave import MySQLDBSlave\n\n jianv1 = MySQLDBSlave(\n masters=[\n {\n \"name\": \"mysql+mysqldb://jianxun:jianxun@jianxun.dev:3306/jianxunv2?charset=utf8\",\n \"echo\": False,\n \"pool_size\": 5,\n \"pool_recycle\": 1,\n }\n ],\n slaves=[\n {\n \"name\": \"mysql+mysqldb://jianxun:jianxun@jianxunv2.dev:3306/jianxunv2?charset=utf8\",\n \"echo\": False,\n \"pool_size\": 5,\n \"pool_recycle\": 1,\n }\n ],\n is_auto_allocation=True)\n\n\n def get_info_by_email(email):\n _t = jianv1.table.customer_member_t\n sql = select([_t]).where(_t.c.email == email)\n return jianv1.execute(sql).fetchone()\n\n\n def update_info_by_email(email):\n _t = jianv1.table.customer_member_t\n sql = _t.update().where(_t.c.email == email).values(name=u\"\u7a7f\u5b8c\")\n jianv1.execute(sql)\n\n\n if __name__ == \"__main__\":\n result = get_info_by_email(\"592030542@qq.com\")\n logging.info(result)\n update_info_by_email(\"592030542@qq.com\")\n\n\nTODO\n----\n\n- \u6839\u636e\u4e0d\u540c\u7684\u73af\u5883\uff0c\u7528\u6237\u9009\u62e9\u4e0d\u540c\u7684slave\n- add retry connecting(bug: interactive_timeout)\n- add is_auto_allocation(Automatic Identification master and slave)\n- Thread Safety\n\n\nSupport\n-------\n\nIf you need help using pymysqlslave or have found a bug, please open a `github issue`_.\n\n.. _github issue: https://github.com/nashuiliang/pymysqlslave/issues\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nashuiliang/pymysqlslave", "keywords": "mysqldb slave master balancing sqlalchemy", "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "pymysqlslave", "package_url": "https://pypi.org/project/pymysqlslave/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pymysqlslave/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nashuiliang/pymysqlslave" }, "release_url": "https://pypi.org/project/pymysqlslave/1.0.8/", "requires_dist": null, "requires_python": null, "summary": "Simple Master Slave Load Balancing", "version": "1.0.8" }, "last_serial": 1877396, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "076bef6390a975d528b212f80c120e94", "sha256": "22b829a9cac5fc3831d36965d2ad4f9ba85c02c7e7aae18ee0f7de4872805f57" }, "downloads": -1, "filename": "pymysqlslave-1.0.1-py2.7.egg", "has_sig": false, "md5_digest": "076bef6390a975d528b212f80c120e94", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 7527, "upload_time": "2015-09-24T11:49:55", "url": "https://files.pythonhosted.org/packages/dc/56/69992d1ee92a9a452ab67ef8d6b8f36e1bb40c227b3e90fccf34b0472f3b/pymysqlslave-1.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "c46e7adebc33ddac77f31a75963da9b9", "sha256": "6bc56585505d9a1f1423c0ebf8619380d5c81c94955b899bfff4e58dc9633a82" }, "downloads": -1, "filename": "pymysqlslave-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c46e7adebc33ddac77f31a75963da9b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3369, "upload_time": "2015-09-24T11:49:49", "url": "https://files.pythonhosted.org/packages/c1/15/622812ae84289f13fc1ab0dc2e23cf527a3d06380d1edaa86f71e4d036ac/pymysqlslave-1.0.1.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "0bcc56dfde57dc7c9287645f8028f6a9", "sha256": "617bb5865e4e147e4be95984b5e6fa52cd1628cd46936328de4e52ec8d0693b4" }, "downloads": -1, "filename": "pymysqlslave-1.0.3-py2.7.egg", "has_sig": false, "md5_digest": "0bcc56dfde57dc7c9287645f8028f6a9", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9191, "upload_time": "2015-09-27T15:34:20", "url": "https://files.pythonhosted.org/packages/ce/25/edff444f0403810fb0cfe2d35a9899ba617d1383695172140d4c6fbe866b/pymysqlslave-1.0.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "effb1e60cd0005fe833e21451c7bdced", "sha256": "a0984e68507f6533355f5f506d15e670fe717716f212613220e298ee02ebe1a1" }, "downloads": -1, "filename": "pymysqlslave-1.0.3.tar.gz", "has_sig": false, "md5_digest": "effb1e60cd0005fe833e21451c7bdced", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4071, "upload_time": "2015-09-27T15:34:15", "url": "https://files.pythonhosted.org/packages/d5/66/59c6cd1850fbb734a970394c1d8715d4d08f80ee7ea6a208a77dc24cb83a/pymysqlslave-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "39154b559b5c7444c3e19cf47cff396a", "sha256": "200dfb60d1d228cf4cb7d45e9d942f7976c2615c0ca317355e128f7b5502610d" }, "downloads": -1, "filename": "pymysqlslave-1.0.4-py2.7.egg", "has_sig": false, "md5_digest": "39154b559b5c7444c3e19cf47cff396a", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9201, "upload_time": "2015-09-27T16:02:55", "url": "https://files.pythonhosted.org/packages/1e/65/bd401d80786163d0ba29b0fe373317dbdcc26c252b0646e659a5f7dfa174/pymysqlslave-1.0.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "22e163f6273c7f499f56721ef4df93dc", "sha256": "800382545e1fcb59b676bbd916e765963dac580118dd75045e66a16b3e60d94a" }, "downloads": -1, "filename": "pymysqlslave-1.0.4.tar.gz", "has_sig": false, "md5_digest": "22e163f6273c7f499f56721ef4df93dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4745, "upload_time": "2015-09-27T16:02:37", "url": "https://files.pythonhosted.org/packages/df/4d/82ec3e39d56daf197a27b6eab9b7e4c0fe003979577906be635188328859/pymysqlslave-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "f785dd6c1f6f9355cb4a10ea0c01cf3f", "sha256": "97eb59b402370b3b4e769a57b9ee0fda0e0981d6122db20df06e36edf64ed942" }, "downloads": -1, "filename": "pymysqlslave-1.0.5-py2.7.egg", "has_sig": false, "md5_digest": "f785dd6c1f6f9355cb4a10ea0c01cf3f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9015, "upload_time": "2015-10-11T08:27:49", "url": "https://files.pythonhosted.org/packages/77/1b/f13986bd2062bb11ea8da48ea7b71130183ab1174359433b925914529a5f/pymysqlslave-1.0.5-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "d403b08618c7dc12f878367fffa66815", "sha256": "31bc24bce913fad3dabd6b3aec45270e7c58e6af1977822472780b6fc32e0a33" }, "downloads": -1, "filename": "pymysqlslave-1.0.5.tar.gz", "has_sig": false, "md5_digest": "d403b08618c7dc12f878367fffa66815", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4715, "upload_time": "2015-10-11T08:27:44", "url": "https://files.pythonhosted.org/packages/80/e5/884e5b1cccfdba20bdb0b8658aebd42818501d603cd0343e77d0071f9cb6/pymysqlslave-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "cf2a527b40a74511c40b705b734c07e0", "sha256": "f8d7ca9af6f1ee93e96acd95cf05adc42915ac531829130cada9a1525b55d25f" }, "downloads": -1, "filename": "pymysqlslave-1.0.6-py2.7.egg", "has_sig": false, "md5_digest": "cf2a527b40a74511c40b705b734c07e0", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9338, "upload_time": "2015-10-12T08:36:45", "url": "https://files.pythonhosted.org/packages/79/4f/0c5c51013c34ee099e3986a81af2c8e73a0f63ce5e2952cd4d112958d87b/pymysqlslave-1.0.6-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4ebacacdd9eb3ecc8b720ce467deb372", "sha256": "40db8c7d2b15802bdd511816ff55e545211fc5d46e8f07b9d1a0a112a048b8f8" }, "downloads": -1, "filename": "pymysqlslave-1.0.6.tar.gz", "has_sig": false, "md5_digest": "4ebacacdd9eb3ecc8b720ce467deb372", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4825, "upload_time": "2015-10-12T08:36:40", "url": "https://files.pythonhosted.org/packages/5d/fa/e7f1bd9bb7035e7783b931213e889ec42ccad175f643627b7e39eba7e668/pymysqlslave-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "e0200ba3f64504e4a60a5b3da6e99c7f", "sha256": "70a51b89c65ca8deb8e851f67bf125d11be3b13cffcb1407f646b13982ccca82" }, "downloads": -1, "filename": "pymysqlslave-1.0.7.tar.gz", "has_sig": false, "md5_digest": "e0200ba3f64504e4a60a5b3da6e99c7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4905, "upload_time": "2015-12-25T13:16:51", "url": "https://files.pythonhosted.org/packages/c6/b6/55741e661d4bf8e75c6eb5830cdc9965a62d98ca1e16ce88a9ddc3de13e2/pymysqlslave-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "fbc78a5d55327805081002e9ad6b4641", "sha256": "b318e4f9e09eedd396b87b4238cd1be98c0aaf43a337fcdc83e1202d2afbb629" }, "downloads": -1, "filename": "pymysqlslave-1.0.8-py2.7.egg", "has_sig": false, "md5_digest": "fbc78a5d55327805081002e9ad6b4641", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9369, "upload_time": "2015-12-25T13:32:26", "url": "https://files.pythonhosted.org/packages/a0/19/e2125435a0e8895bcbb9532fd030c529f2dac659a28a4055b20824ed4616/pymysqlslave-1.0.8-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "06e8041d94394641cd5ab1d540ea4688", "sha256": "9d8b846aaf594346263dece13d2dc0a69d2ab9a510f514f11bd5d64914db5a45" }, "downloads": -1, "filename": "pymysqlslave-1.0.8.tar.gz", "has_sig": false, "md5_digest": "06e8041d94394641cd5ab1d540ea4688", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4904, "upload_time": "2015-12-25T13:27:18", "url": "https://files.pythonhosted.org/packages/2c/de/ea0ef0576c2ab1001b8c79831dd5d4ec864e7646d9534d01ed2c8e315cb6/pymysqlslave-1.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fbc78a5d55327805081002e9ad6b4641", "sha256": "b318e4f9e09eedd396b87b4238cd1be98c0aaf43a337fcdc83e1202d2afbb629" }, "downloads": -1, "filename": "pymysqlslave-1.0.8-py2.7.egg", "has_sig": false, "md5_digest": "fbc78a5d55327805081002e9ad6b4641", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9369, "upload_time": "2015-12-25T13:32:26", "url": "https://files.pythonhosted.org/packages/a0/19/e2125435a0e8895bcbb9532fd030c529f2dac659a28a4055b20824ed4616/pymysqlslave-1.0.8-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "06e8041d94394641cd5ab1d540ea4688", "sha256": "9d8b846aaf594346263dece13d2dc0a69d2ab9a510f514f11bd5d64914db5a45" }, "downloads": -1, "filename": "pymysqlslave-1.0.8.tar.gz", "has_sig": false, "md5_digest": "06e8041d94394641cd5ab1d540ea4688", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4904, "upload_time": "2015-12-25T13:27:18", "url": "https://files.pythonhosted.org/packages/2c/de/ea0ef0576c2ab1001b8c79831dd5d4ec864e7646d9534d01ed2c8e315cb6/pymysqlslave-1.0.8.tar.gz" } ] }