
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
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.
This package uses
mysql-replication <https://github.com/noplay/python-mysql-replication>
__
to read events from MySQL's binlog and send to blinker's signal.
It will send RowsEvent only.
Whenever a binlog event come, it will be dispatched into some signals:
#. binlog_position_signal: 1 signal for the binlog current position #. binlog_signal: 1 signal for the binlog event. #. rows_signal: 1 signal for event's rows. 1 signal per row.
There are 5 signals:
binlog_position_signal
: sent whenever binlog event come to notify the
current position of binlog streambinlog_signal
: sent whenever binlog event come to notify the binlog eventrows_inserted_signal
, rows_updated_signal
, rows_deleted_signal
: sent
on the event as their nameTo 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:
.. code-block:: python
from mysqlbinlog2blinker import signals
@signal.rows_updated.connect
def on_rows_updated_signal(table_name, rows, meta):
pass
@signal.binlog_signal.connect
def on_binlog_signal(event, stream):
pass
To start publishing signals
.. code-block:: python
from pymysqlblinker import start_publishing
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:
.. code-block:: python
from pymysqlblinker import start_replication
start_replication(
{
'host': 'localohst',
'user': 'root',
},
('/path/to/file/that/remember/binlog/position', 2),
)
0.1
- First version
FAQs
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.
We found that mysqlbinlog2blinker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.