Skip to main content

This project listen on mysql binlog (as a slave) and send the binlog event to blinker signal. It can remember last binlog position and work as a MySQL slave.

Project description


This package uses mysql-replication to read events from MySQL’s binlog and send to blinker’s signal.

  • binlog action level
  • rows level

It will send RowsEvent only.

Whenever a binlog event come, it will be dispatched into some signals:

  1. binlog_position_signal: 1 signal for the binlog current position
  2. binlog_signal: 1 signal for the binlog event.
  3. rows_signal: 1 signal for event’s rows. 1 signal per row.


There are 5 signals:

  1. binlog_position_signal: sent whenever binlog event come to notify the current position of binlog stream
  2. binlog_signal: sent whenever binlog event come to notify the binlog event
  3. rows_inserted_signal, rows_updated_signal, rows_deleted_signal: sent on the event as their name

Connect to signals

To connect to a signal, you can use the signal instance or a decorator.

Suppose that you need to connect to write signal on table db0.table1:

from mysqlbinlog2blinker import signals

def on_rows_updated_signal(table_name, rows, meta):

def on_binlog_signal(event, stream):

Signal publishing

To start publishing signals

from pymysqlblinker import start_publishing

        'host': 'localohst',
        'user': 'root',


This package support a method to replicate from mysql database. It operates by keep memory at last binlog position. By default, it save to a file.

To make it, call:

from pymysqlblinker import start_replication

        'host': 'localohst',
        'user': 'root',
    ('/path/to/file/that/remember/binlog/position', 2),

Change logs


  • First version

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mysqlbinlog2blinker, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size mysqlbinlog2blinker-0.1.tar.gz (8.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page