{ "info": { "author": "Dror Asaf", "author_email": "drorasaf87@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database" ], "description": "=============\nMongoTriggers\n=============\n.. image:: https://api.travis-ci.org/drorasaf/mongotriggers.svg?branch=master\n :target: https://travis-ci.org/drorasaf/mongotriggers\n\n.. image:: https://coveralls.io/repos/github/drorasaf/mongotriggers/badge.svg?branch=master\n :target: https://coveralls.io/github/drorasaf/mongotriggers?branch=master\n\n.. image:: https://img.shields.io/pypi/v/mongotriggers.svg\n :target: https://pypi.python.org/pypi/mongotriggers\n\n.. image:: https://img.shields.io/pypi/dm/mongotriggers.svg\n :target: https://pypi.python.org/pypi/mongotriggers\n\n.. image:: https://readthedocs.org/projects/mongotriggers/badge/?version=latest\n :target: http://mongotriggers.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\nWhat is this?\n-------------\nmongodb-triggers is a light-weight library to allow real live changes notification.\nThis is similar to triggers in SQL. This capability can be found both in Java and JavaScript(MeteorJS)\n\nWhat is it good for?\n====================\nModern applications have become near real-time response and updates, this leads to the requirement that any changes done in the data to be propagated up to the top level of the application as soon as possible.\n\nIn order to allow this to happen, any changes in the databases must be notified, similar project that use this method is https://github.com/meteor/meteor.\n\nMore Documentation can be found at http://mongotriggers.readthedocs.io\n\nInstallation\n============\n\nInstaller is available on PyPI. You can install it through pip::\n\n $ pip install mongotriggers\n\nWhy should I use it?\n====================\nThe best functionality is the one that another one is maintaining for you, as well as 100% code coverage.\nThis package follows best practices as published by MongoDB: \n- https://www.mongodb.com/blog/post/tailing-mongodb-oplog-sharded-clusters\n- https://www.mongodb.com/blog/post/pitfalls-and-workarounds-for-tailing-the-oplog-on-a-mongodb-sharded-cluster \n\nHow to use?\n===========\nLet's assume the system in development is a financial one, and every deletion in the database is extremely important, so we would like to notified for each deletion.\n\n\n.. code-block:: python\n\n from mongotriggers import MongoTrigger\n from pymongo import MongoClient\n\n def notify_manager(op_document):\n print ('wake up! someone is adding me money')\n\n client = MongoClient(host='localhost', port=27017)\n triggers = MongoTrigger(conn)\n triggers.register_op_trigger(notify_manager, 'my_account', 'my_transactions')\n\n triggers.tail_oplog()\n client['my_account']['my_transactions'].insert_one({\"balance\": 1000})\n triggers.stop_tail()\n\n\nKeep in mind that it is meant to run in a defered context in order to run endlessly until it is cancelled.\n\nTesting\n=======\nIn order to develop, the additional requirements are:\n\n- pytest\n- pytest-cov\n- tox\n\nAll packages can be installed using pip.\nThe easiest way to run the tests is to run tox.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/drorasaf/mongotriggers/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "mongotriggers", "package_url": "https://pypi.org/project/mongotriggers/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mongotriggers/", "project_urls": { "Homepage": "https://github.com/drorasaf/mongotriggers/" }, "release_url": "https://pypi.org/project/mongotriggers/2.0.1/", "requires_dist": [ "pymongo" ], "requires_python": "", "summary": "livedata for MongoDB, similar to RDBM triggers or meteorjs livedata", "version": "2.0.1" }, "last_serial": 2818139, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e94c238360e0621bf40def93eff5d4e5", "sha256": "e3dbfdef41313821fc81a4352e87bc627357bc397b4ab06f62eb42324933e73b" }, "downloads": -1, "filename": "mongotriggers-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e94c238360e0621bf40def93eff5d4e5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5873, "upload_time": "2016-10-23T01:50:11", "url": "https://files.pythonhosted.org/packages/67/44/babd7018ae3c394bd11f4df3d81978a22afbdbb2177e0b7291ec8dcfc32f/mongotriggers-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "956efd03767345f2e1f824e6e20fcbef", "sha256": "af35a265e83b63b15f069eb872834a33b67f178413d512fbad1dc0f3c913cd9e" }, "downloads": -1, "filename": "mongotriggers-1.0.0.tar.gz", "has_sig": false, "md5_digest": "956efd03767345f2e1f824e6e20fcbef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6028, "upload_time": "2016-10-23T01:50:15", "url": "https://files.pythonhosted.org/packages/56/5c/b765a8ef0507b786e21d74d47797c751d37c97bf9ee40f5920cad4a075f3/mongotriggers-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "618f1535e73305ef4ecdf5d90fad118b", "sha256": "d4aec25ff2d46ed967aa6ff4335a541c7b71d9c525eff85cf7b09c9c5308feea" }, "downloads": -1, "filename": "mongotriggers-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "618f1535e73305ef4ecdf5d90fad118b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5861, "upload_time": "2016-10-23T01:56:51", "url": "https://files.pythonhosted.org/packages/6b/b6/c40c4f828371f5d6e6b2070cfc64f1b1771e4d75f9f4eadc1b5909e2a05f/mongotriggers-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6493627066a458527fac0cfba61625a6", "sha256": "c98a36af67edb52b7a4af0ac6828d09c370f3d5868aa5644c57a4ceb2bece0ac" }, "downloads": -1, "filename": "mongotriggers-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6493627066a458527fac0cfba61625a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6064, "upload_time": "2016-10-23T01:56:54", "url": "https://files.pythonhosted.org/packages/79/7a/5ffa13fdbc8c330da24ded847fbc9de0b5b1f207391e7e264488590b9758/mongotriggers-1.0.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "3c6c06887b2dc7b8b535468dbeda02d3", "sha256": "6e407204f6c4a29f5fbef0fc169b0d902de2d28e0fcf017fe109b55f47931bee" }, "downloads": -1, "filename": "mongotriggers-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3c6c06887b2dc7b8b535468dbeda02d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7559, "upload_time": "2017-04-19T22:45:21", "url": "https://files.pythonhosted.org/packages/6f/57/98a2da15355b73c611e0a90c136d1e6281ea0e6276e38d9b88a3c578e1ee/mongotriggers-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0be7d06511361d0f9ff1a3460b289a9e", "sha256": "d5dfaafbfa90090651f763e8f5e281fc60decf800751fa6cc581d4c4cf4e4021" }, "downloads": -1, "filename": "mongotriggers-2.0.0.tar.gz", "has_sig": false, "md5_digest": "0be7d06511361d0f9ff1a3460b289a9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12931, "upload_time": "2017-04-19T22:45:23", "url": "https://files.pythonhosted.org/packages/5f/02/c10d7ba3c38db0f9294ac7ee53308424ff3e21b180ccc5c1c6526461d5cd/mongotriggers-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "79bad67ff1fd0e5462b975c358bdfc57", "sha256": "220c69eef774510898ce52ba5bafc39e741d641f34349edc094fde6d8b196ffd" }, "downloads": -1, "filename": "mongotriggers-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79bad67ff1fd0e5462b975c358bdfc57", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7561, "upload_time": "2017-04-20T22:27:23", "url": "https://files.pythonhosted.org/packages/49/84/fa233d8888593cca7a8094a7981896ca39579ada056b92330a78e4ed52d6/mongotriggers-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbba9423fc6fbfc78f1d5257f8dce721", "sha256": "74a31438a9013c72906a3b7f07a13bf2f688832090d03103036f11c7425112a4" }, "downloads": -1, "filename": "mongotriggers-2.0.1.tar.gz", "has_sig": false, "md5_digest": "dbba9423fc6fbfc78f1d5257f8dce721", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12962, "upload_time": "2017-04-20T22:27:17", "url": "https://files.pythonhosted.org/packages/1e/8f/fd70e3290242d2c3c02a8878127e2bd91161f380d81c07735c656a1ec1c2/mongotriggers-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "79bad67ff1fd0e5462b975c358bdfc57", "sha256": "220c69eef774510898ce52ba5bafc39e741d641f34349edc094fde6d8b196ffd" }, "downloads": -1, "filename": "mongotriggers-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79bad67ff1fd0e5462b975c358bdfc57", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7561, "upload_time": "2017-04-20T22:27:23", "url": "https://files.pythonhosted.org/packages/49/84/fa233d8888593cca7a8094a7981896ca39579ada056b92330a78e4ed52d6/mongotriggers-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbba9423fc6fbfc78f1d5257f8dce721", "sha256": "74a31438a9013c72906a3b7f07a13bf2f688832090d03103036f11c7425112a4" }, "downloads": -1, "filename": "mongotriggers-2.0.1.tar.gz", "has_sig": false, "md5_digest": "dbba9423fc6fbfc78f1d5257f8dce721", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12962, "upload_time": "2017-04-20T22:27:17", "url": "https://files.pythonhosted.org/packages/1e/8f/fd70e3290242d2c3c02a8878127e2bd91161f380d81c07735c656a1ec1c2/mongotriggers-2.0.1.tar.gz" } ] }