https://github.com/jettify/aiomysql_replication
(Abandoned )aiomysql_replication - implementation of MySQL replication protocol build
https://github.com/jettify/aiomysql_replication
Last synced: 18 days ago
JSON representation
(Abandoned )aiomysql_replication - implementation of MySQL replication protocol build
- Host: GitHub
- URL: https://github.com/jettify/aiomysql_replication
- Owner: jettify
- License: other
- Created: 2015-05-07T12:30:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T13:01:10.000Z (over 9 years ago)
- Last Synced: 2025-02-03T22:38:12.855Z (3 months ago)
- Language: Python
- Homepage:
- Size: 230 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.txt
- License: LICENSE
Awesome Lists containing this project
README
aiomysql_replication (Work in Progress)
=======================================**aiomysql_replication** - implementation of MySQL replication protocol build
on top of aiomysql and PyMySQL for asynico (PEP-3156/tulip). This library is
fork of python-mysql-replication_ with asyncio_ support.Basic Example
-------------.. code:: python
import asyncio
from aiomysql_replication import create_binlog_streamMYSQL_SETTINGS = {
"host": "127.0.0.1",
"port": 3306,
"user": "root",
"password": ""
}loop = asyncio.get_event_loop()
@asyncio.coroutine
def test_example():
stream = yield from create_binlog_stream(
connection_settings=MYSQL_SETTINGS, server_id=3, blocking=True,
loop=loop)while True:
event = yield from stream.fetchone()
event.dump()
stream.close()loop.run_until_complete(test_example())
Use cases
---------* MySQL to NoSQL database replication
* MySQL to search engine replication
* Invalidate cache when something change in database
* Audit
* Real time analyticsRequirements
------------* Python_ 3.3+
* asyncio_ or Python_ 3.4+
* PyMySQL_
* aiomysql_.. _Python: https://www.python.org
.. _asyncio: http://docs.python.org/3.4/library/asyncio.html
.. _PyMySQL: https://github.com/PyMySQL/PyMySQL
.. _python-mysql-replication: https://github.com/noplay/python-mysql-replication
.. _aiomysql: https://github.com/aio-libs/aiomysql