{ "info": { "author": "Lx Yu", "author_email": "i@lxyu.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development" ], "description": "=====\nMeepo\n=====\n\n.. image:: http://img.shields.io/travis/eleme/meepo/master.svg?style=flat\n :target: https://travis-ci.org/eleme/meepo\n\n.. image:: http://img.shields.io/pypi/v/meepo.svg?style=flat\n :target: https://pypi.python.org/pypi/meepo\n\n.. image:: http://img.shields.io/pypi/dm/meepo.svg?style=flat\n :target: https://pypi.python.org/pypi/meepo\n\nMeepo is event sourcing and event broadcasting for databases.\n\nDocumentation: https://meepo.readthedocs.org/\n\n\nInstallation\n============\n\nInstall with pip\n\n.. code:: bash\n\n $ pip install meepo\n\nTo use mysql binlog as event source, install additional requires with\n\n.. code:: bash\n\n $ pip install meepo[mysqlbinlog]\n\n\nFeatures\n========\n\nMeepo can publish the table events from database to the outside, so it can\nbe used to do a lot of interesting things, including:\n\n- cache invalidation\n\n- replication to RDBS / NoSQL / SearchEngine\n\n- event sourcing\n\n- logging and auditing\n\n- realtime analytics\n\n- notifications pushing\n\n\nIntro\n=====\n\n``meepo`` is event sourcing and event broadcasting for databases, it follows\ndatabase table events from ``sqlalchemy`` and ``mysql binlog``, and publish\nthem to subscribers.\n\nMySQL Pub\n---------\n\n``mysql_pub`` event flow::\n\n +---------------------+\n | |\n +---> table_write event |\n | | |\n | +---------------------+\n |\n +--------------------+ +---------------+ |\n | | | | | +---------------------+\n | mysql | | meepo.pub | | | |\n | +------> +--+---> table_update event |\n | row-based binlog | | mysql_pub | | | |\n | | | | | +---------------------+\n +--------------------+ +---------------+ |\n |\n | +---------------------+\n | | |\n +---> table_delete event |\n | |\n +---------------------+\n\n\nMySQL Pub use row-based mysql binlog as events source, and transfer them into\ntable_action events. ``mysql_pub`` generates an accurate event stream with one\npk per event.\n\nFor example, the following sql:\n\n.. code-block:: sql\n\n INSERT INTO test (data) VALUES ('a');\n INSERT INTO test (data) VALUES ('b'), ('c'), ('d');\n UPDATE test SET data = 'aa' WHERE id = 1;\n UPDATE test SET data = 'bb' WHERE id = 2;\n UPDATE test SET data = 'cc' WHERE id != 1;\n DELETE FROM test WHERE id != 1;\n DELETE FROM test WHERE id = 1;\n\nGenerates the following events:\n\n::\n\n test_write 1\n test_write 2\n test_write 3\n test_write 4\n test_update 1\n test_update 2\n test_update 2\n test_update 3\n test_update 4\n test_delete 2\n test_delete 3\n test_delete 4\n test_delete 1\n\n\nSQLAlchemy Pub\n==============\n\n``sqlalchemy_pub`` event flow::\n\n +------------------+\n | |\n | meepo.pub |\n | |\n | sqlalchemy_pub | +---------------------+\n | | +-----------------------+ | |\n +---------+--------+ | | +---> table_write event |\n | | before_flush | | | |\n hook | +--> | | +---------------------+\n | | | record model states | |\n +---------v--------+ | | | |\n | | | +-----------+-----------+ | +---------------------+\n | sqlalchemy | | | | | |\n | +--+ | +------> table_update event |\n | session events | | | | | |\n | | +-----------v-----------+ | | +---------------------+\n +------------------+ | | | |\n | after_commit | | |\n | +--+ | +---------------------+\n | record model states | | | |\n | | +---> table_delete event |\n +-----------------------+ | |\n +---------------------+\n\n\n\n``SQLAlchemy`` is a ORM layer above database, it uses ``session`` to maintain\nmodel instances states before the data flush to database, and flush them to\ndatabase in commit.\n\nSo ``meepo`` will hook into the event system, record all the instances in\n``session.new``, ``session.dirty``, ``session.deleted`` in ``before_flush`` event,\nthen publish the table_action event after commit issued.\n\nFor example, the following code:\n\n.. code-block:: python\n\n class Test(Base):\n __tablename__ = \"test\"\n id = Column(Integer, primary_key=True)\n data = Column(String)\n\n t_1 = Test(id=1, data='a')\n session.add(t_1)\n session.commit()\n\n t_2 = Test(id=2, data='b')\n t_3 = Test(id=3, data='c')\n session.add(t_2)\n session.add(t_3)\n session.add(t_4)\n session.commit()\n\n t_2.data = \"x\"\n session.commit()\n\n session.delete(t_3)\n session.commit()\n\nGenerates the following events:\n\n::\n\n test_write 1\n test_write 2\n test_write 3\n test_update 2\n test_delete 3\n\n\nExamples\n========\n\nRefer to ``meepo/examples/`` for more examples.\n\n\nContribute\n==========\n\n1. Fork the repo and make changes.\n\n2. Write a test which shows a bug was fixed or the feature works as expected.\n\n3. Make sure travis-ci test succeed.\n\n4. Send pull request.", "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/eleme/meepo", "keywords": "eventsourcing event sourcing replication cache elasticsearch", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "meepo", "package_url": "https://pypi.org/project/meepo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/meepo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/eleme/meepo" }, "release_url": "https://pypi.org/project/meepo/0.1.9/", "requires_dist": null, "requires_python": null, "summary": "event sourcing for databases.", "version": "0.1.9" }, "last_serial": 1321551, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "3afbfcc4c9c20a1ddafac69b76cbe92e", "sha256": "73414648efea0461413ebc7ad82bad2f2f0647025decd0d7134aac596c01bd1a" }, "downloads": -1, "filename": "meepo-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3afbfcc4c9c20a1ddafac69b76cbe92e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9003, "upload_time": "2014-08-07T03:52:59", "url": "https://files.pythonhosted.org/packages/96/a7/e2e65983e286ba2e33e822cfb1bbe894bea799d38ab324dd7dd526e50dca/meepo-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a79c3c00aaf9c391500c1e1b6ce66753", "sha256": "683ec137a6b993e91caeab978678ff12496e767f317ab9741991950330f70ee4" }, "downloads": -1, "filename": "meepo-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a79c3c00aaf9c391500c1e1b6ce66753", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8989, "upload_time": "2014-08-15T06:57:26", "url": "https://files.pythonhosted.org/packages/af/a3/6731e438eb7d10fa2392aef34b9e185c78941e3846313d45eb99baab9f78/meepo-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "45e5d5730f07c97914a99a7c163e4290", "sha256": "15f4f51c7988e7fd8050643b088c24f2da618265fa8038ffc4922c56798dae82" }, "downloads": -1, "filename": "meepo-0.1.3.tar.gz", "has_sig": false, "md5_digest": "45e5d5730f07c97914a99a7c163e4290", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9228, "upload_time": "2014-08-29T10:16:40", "url": "https://files.pythonhosted.org/packages/4c/1a/f63b2dacf7e4da864c4bc4524dea1b68f06ba743f50ec22b8a67cc685d6e/meepo-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "a916ac4429917f279d886ad99d3b30e1", "sha256": "b17d8184e95a0f9fb6204cf36a6c00d7a19cef076538c4221dc44b9f3fd64cba" }, "downloads": -1, "filename": "meepo-0.1.4.tar.gz", "has_sig": false, "md5_digest": "a916ac4429917f279d886ad99d3b30e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9814, "upload_time": "2014-09-02T10:28:14", "url": "https://files.pythonhosted.org/packages/fd/40/cc4512f4296d5055f43d08d30f96726cfec425f4cb0f7ff440198c778858/meepo-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "36f7319d6b82318023628a86ba88236d", "sha256": "caf391f1f825f9321da30c2d8dcf44f33623f6bea2486cea0d954b1c7f1486e4" }, "downloads": -1, "filename": "meepo-0.1.5.tar.gz", "has_sig": false, "md5_digest": "36f7319d6b82318023628a86ba88236d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10175, "upload_time": "2014-09-12T08:51:24", "url": "https://files.pythonhosted.org/packages/49/b1/dab19e5c897441b4314353c417b3c5e4eb07cb9e5482bdc62ee94ea6c7dd/meepo-0.1.5.tar.gz" } ], "0.1.5.1": [ { "comment_text": "", "digests": { "md5": "13b9765695b1e2fff0f7860794f0323a", "sha256": "2a994ea537e296276e62e9445c48e2e1d0519f45b23dc2b438228ed8c9971bd3" }, "downloads": -1, "filename": "meepo-0.1.5.1.tar.gz", "has_sig": false, "md5_digest": "13b9765695b1e2fff0f7860794f0323a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10191, "upload_time": "2014-09-16T08:51:42", "url": "https://files.pythonhosted.org/packages/9b/94/f4b5d96aab14912c08d2682bdbee3f4419946ac31ac7f07412b17fee6695/meepo-0.1.5.1.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "8805c90e492ca0dbbe6260bb0303d6d3", "sha256": "0e766bee5ee879be6ff0342057c551822375c69a90374defea5bd85213f319e1" }, "downloads": -1, "filename": "meepo-0.1.6.tar.gz", "has_sig": false, "md5_digest": "8805c90e492ca0dbbe6260bb0303d6d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10916, "upload_time": "2014-09-24T15:55:33", "url": "https://files.pythonhosted.org/packages/ff/4b/69b6412d584bb550b7cd6e120490aa8be5465546246c90794c11b20dd1c7/meepo-0.1.6.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "a4466d9fdf1d82eaf3c3f9a361cfa0db", "sha256": "2a29786a9a6aec3e719668b166ce44d7fabbe59a3378b6fcc3a2a2e11ec89f81" }, "downloads": -1, "filename": "meepo-0.1.8.tar.gz", "has_sig": false, "md5_digest": "a4466d9fdf1d82eaf3c3f9a361cfa0db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12354, "upload_time": "2014-11-07T09:27:15", "url": "https://files.pythonhosted.org/packages/54/65/db48b18e14c1c573c89e86d6344d559bcce30e3c6bcb13beb256ef2f3be4/meepo-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "9da8a1c0f86b3f14f7d3a27cd5b3c042", "sha256": "fae12e791a4e6ff7d2da4bbad1ca7076273de4e2eecb89ad2d05c3985482dba3" }, "downloads": -1, "filename": "meepo-0.1.9.tar.gz", "has_sig": false, "md5_digest": "9da8a1c0f86b3f14f7d3a27cd5b3c042", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13608, "upload_time": "2014-11-26T10:42:12", "url": "https://files.pythonhosted.org/packages/e8/c3/5a9f7fe60612808e8ea5013661083f6afd1b8c00863454da23254fd05166/meepo-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9da8a1c0f86b3f14f7d3a27cd5b3c042", "sha256": "fae12e791a4e6ff7d2da4bbad1ca7076273de4e2eecb89ad2d05c3985482dba3" }, "downloads": -1, "filename": "meepo-0.1.9.tar.gz", "has_sig": false, "md5_digest": "9da8a1c0f86b3f14f7d3a27cd5b3c042", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13608, "upload_time": "2014-11-26T10:42:12", "url": "https://files.pythonhosted.org/packages/e8/c3/5a9f7fe60612808e8ea5013661083f6afd1b8c00863454da23254fd05166/meepo-0.1.9.tar.gz" } ] }