{ "info": { "author": "Gabriel Gazola Milan", "author_email": "gabriel.gazola@poli.ufrj.br", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Akuanduba\n\n

\n \n

\n\nImage source: [link](https://my-bestiario.fandom.com/pt-br/wiki/Akuanduba)\n\nAkuanduba is a Python framework that eases manipulation of multiple running threads and shared resources. Its name was inspired by a god of the Brazilian mythology: Akuanduba, the god of order.\n\nThis framework's been based on the [Gaugi](https://gitlab.cern.ch/jodafons/gaugi) project, a framework that Jo\u00e3o, the author of Gaugi, presented to me.\n\n# Top 5 reasons for Akuanduba\n\nThis is really a TL;DR section:\n\n* Flexible;\n* Easy developing and debugging;\n* Robust structure;\n* Effortless threading and shared resources manipulation;\n* Smooth attaching and removing features from your script.\n\n# First steps\n\n* Clone this repository:\n\n```\ngit clone https://github.com/gabriel-milan/Akuanduba\n```\n\n* Install this library:\n\n```\npip3 install Akuanduba\n```\n\n* Go to the example script folder:\n\n```\ncd Akuanduba/examples/TimedCounterFileSaving\n```\n\n* Read the script, in order to understand what's supposed to happen when you run it:\n\n```\nvim SampleScript.py\n```\n\n* Run the example script:\n\n```\npython3 SampleScript.py\n```\n\n# The paradigm\n\n## Base classes\n\nUsing Akuanduba, you'll have three base classes you can use to attend your needs, as they relate to one another through a common class called *Context* (this will be explained really soon). The three classes are:\n\n* *AkuandubaTool*;\n* *AkuandubaService*;\n* *AkuandubaDataframe*.\n\n**AkuandubaDataframe** is a base class for data models that will be attached to the *Context*. In other words, these *data frames* can store anything you desire and be accessible from any *tool* or *service* running on your main script. **Example:** Use data frames for storing data acquired with a service.\n\n**AkuandubaTool** is a base class for methods that will run once on every call, processing data from any *data frame* attached to the *Context* and appending the results to another *data frame* (or even the same). *Tools* have one main method: the \"execute\", where all the calculations will occur every time they're called. **Example:** Use tools to process data acquired by a service and store it on a data frame.\n\n**AkuandubaService** is a base class for parallel threads. These *services* have two main methods: \"run\", which is a loop that will be running parallel to the whole framework and \"execute\", that's executed once in every call. **Example**: Use services to acquire data.\n\n## Other main concepts\n\nBesides these base classes, Akuanduba relies on few other main concepts:\n\n* *Context*;\n* *DataframeManager*;\n* *ToolManager*;\n* *ServiceManager*;\n* *AkuandubaTrigger*.\n\nThe **Context** is an abstraction that holds every single thing attached to the framework: *tools*, *services* and *data frames*. This way, everything is accessible from any other component attached to Akuanduba. Every *dataframe* you get from the context is locked to your *execute* method and released only after its execution.\n\nThe **Managers** (*DataframeManager*, *ToolManager* and *ServiceManager*) are all based on the *Manager* class, the only difference among them is that they manage different things. You can manage *data frames*, *tools* and *services*, respectively. In other words, you can attach them with the *\\_\\_add\\_\\_* operation and retrieve them with the *retrieve* method. The things you attach to these managers will run in the order you do it (execution will be better discussed later).\n\nThe **AkuandubaTrigger** is a class that inherits from *AkuandubaTool*. Its purpose is to build an object you can attach multiple hypothesis tests (that must inherit from *TriggerCondition*) and *tools* in order to trigger the *execute* method of all these *tools*. You can use three types of triggers: 'and', 'or' and 'xor', all of them self-explanatory.\n\n## Execution\n\nAkuanduba itself has three main methods: *initialize*, *execute* and *finalize*.\n\nThe *initialize* method follows these steps:\n\n* Insert the framework status into the *Context*;\n* Insert all the *data frames* on the *DataframeManager* into the *Context*;\n* Insert all the *services* on the *ServiceManager* into the *Context*, running them;\n* Insert all the *tools* on the *ToolManager* into the *Context*, running them;\n* Checks for error in the *Context* initialization.\n\nThe *execute* method is the main execution loop. Its tasks are:\n\n* Loop through the *services*, calling their *execute* methods;\n* Loop through the *tools*, calling their *execute* methods;\n\nAnd finally, the *finalize* method just tries to kill every thread created by the Akuanduba framework.\n\n### Example\n\nLet's say you have two *services* that acquire data from different sources and one single *tool* that process the whole data. You could build a script that attaches both *services* to the *ServiceManager* and the *tool* to the *ToolManager*. Let's say that, for this purpose, you've created two *data frames*, one for storing the raw data and one for the processed data. A diagram for your script's execution would be the following:\n\n

\n\n\n\n

\n\nAs you may see, the *run* method of the *services* acquire data in real time (\u221e) and append it to its own queue. On the main Akuanduba loop, the *execute* methods are called and the data is stored on the *data frames* (1 and 2). After that, the *tools* *execute* method will be called, where the data will be processed and stored on another *data frame* (3).\n\n# Changelog\n\n* v0.1.1 - Initial release\n* v0.1.2 - Improved the Logger module\n* v0.1.3 - Implements Locks for AkuandubaDataframes handling\n* v0.1.4 - Adds new implementation of triggers, now allowing AND, OR or XOR with TriggerConditions\n* v0.1.5 - Implements automatic lock releasing for AkuandubaDataframes\n* v0.1.6 - Fixes v0.1.5 bugs with lock releasing\n* v0.2.0 - Implements Linux Watchdog integration, fix minor linter complainings, removes legacy implementation of trigger, changes timer implementation and implements NTP synchronization\n* v0.2.1 - Fixes minor KeyError on Watchdog implementation\n\n# To-Do! (next releases)\n\n* ???\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gabriel-milan/Akuanduba", "keywords": "framework,threading,shared resources,flexibility,python,online", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "Akuanduba", "package_url": "https://pypi.org/project/Akuanduba/", "platform": "", "project_url": "https://pypi.org/project/Akuanduba/", "project_urls": { "Homepage": "https://github.com/gabriel-milan/Akuanduba" }, "release_url": "https://pypi.org/project/Akuanduba/0.2.1/", "requires_dist": [ "datetime", "pytz" ], "requires_python": "", "summary": "Akuanduba is a Python framework that eases manipulation of multiple running threads and shared resources. Its name was inspired by a god of the Brazilian mythology: Akuanduba, the god of order.", "version": "0.2.1" }, "last_serial": 5955979, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "fd9f3a23aa87eb397020e6c4962a8b1f", "sha256": "c276446ff7223d1536fccc9a01120679a1207b977759a898f60cb95420fb0f25" }, "downloads": -1, "filename": "Akuanduba-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "fd9f3a23aa87eb397020e6c4962a8b1f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 43299, "upload_time": "2019-08-05T20:09:07", "url": "https://files.pythonhosted.org/packages/5f/be/bbd66ab22c83cdafb81df563373b1e17a5b5700f48a37cfdd1926305d49d/Akuanduba-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e9f155e3b4121549a1dd2ac8c7d8c79", "sha256": "856820ee4a5aaca48764cee1a5bcbf1ddd6dbe3e8fde0551289b586b509d3f51" }, "downloads": -1, "filename": "Akuanduba-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2e9f155e3b4121549a1dd2ac8c7d8c79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12691, "upload_time": "2019-08-05T20:09:10", "url": "https://files.pythonhosted.org/packages/8f/72/2687a2acd97b96e41543eab3fbd5f01f8d265ca4ca5566082283cf6b90e4/Akuanduba-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f20941dbead5ddcd72ca841ab2f1326c", "sha256": "232416051a5cae8835b2fcc6e534479bd81e6316a7ce7bdc8c73ae6c80b5b6d8" }, "downloads": -1, "filename": "Akuanduba-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f20941dbead5ddcd72ca841ab2f1326c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 43273, "upload_time": "2019-08-06T13:29:18", "url": "https://files.pythonhosted.org/packages/ab/dc/e1d598e022a01675b19529c9942c5557e7be518226af1b824baafd2fe746/Akuanduba-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5cde586028f45f76de1405835432bd45", "sha256": "8176fcb3b28c3e7e257a728395d4498992815b5081a0b61edb5b31b01c006989" }, "downloads": -1, "filename": "Akuanduba-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5cde586028f45f76de1405835432bd45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12751, "upload_time": "2019-08-06T13:31:08", "url": "https://files.pythonhosted.org/packages/b7/3a/7d06c2ccfc5ad1021afcc479aa59813f297716924346b1ed1931d4914b31/Akuanduba-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2e99a0668424341ce48d3d3d82d58f52", "sha256": "05a3cced1d5767334e43473d5e0e470ea3319995dde6390d3f2bdc5d9ec4829c" }, "downloads": -1, "filename": "Akuanduba-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2e99a0668424341ce48d3d3d82d58f52", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 43494, "upload_time": "2019-08-06T14:05:40", "url": "https://files.pythonhosted.org/packages/8b/f1/763a555db9b0b74497125ad89a6ec63fe6704510b49418e0f32f0844165c/Akuanduba-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c9a32c3f66adeb07aa5f9b8c3f465f76", "sha256": "67da6b47908b4623069ac13bc20a02195a1a38198639d0847154006e61e2501e" }, "downloads": -1, "filename": "Akuanduba-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c9a32c3f66adeb07aa5f9b8c3f465f76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12950, "upload_time": "2019-08-06T14:05:42", "url": "https://files.pythonhosted.org/packages/fe/8d/081db072ff660a2db9c1146b5a2b93264559c31a782f460e6763820f59bf/Akuanduba-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "8e87ab3b257e6e5ab073ca8a1aab69a4", "sha256": "52294acab417903ed2167f6b0b0da76b1c39bee22a7a0fc97627f6313fc9e5e2" }, "downloads": -1, "filename": "Akuanduba-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8e87ab3b257e6e5ab073ca8a1aab69a4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 45226, "upload_time": "2019-08-07T17:16:25", "url": "https://files.pythonhosted.org/packages/50/81/4adf1ebd28fac2917a711d73bc15dd28f5199c53a86a044cb9f7486273bd/Akuanduba-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4e65411b92d68435ca5b5cfaf54cdd8", "sha256": "fa4f5f3430071713635cdd1fff87d78274d4e3a8986192ed58b76327ad6d7e3b" }, "downloads": -1, "filename": "Akuanduba-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f4e65411b92d68435ca5b5cfaf54cdd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14095, "upload_time": "2019-08-07T17:16:27", "url": "https://files.pythonhosted.org/packages/06/0a/08d3910955425707f01b5bf07183935693991f1d78828eadf5db7f4a9a5f/Akuanduba-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "f86075e14621c056ceecfb31eb2af5e3", "sha256": "d53ccf60f4817da846e395fff585c2dcd8f3726914cfb28513e9fb08e6009796" }, "downloads": -1, "filename": "Akuanduba-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "f86075e14621c056ceecfb31eb2af5e3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 45372, "upload_time": "2019-08-07T21:08:16", "url": "https://files.pythonhosted.org/packages/de/dd/1862794fc2af47d5a67fe8ec39c76a62810af36765e4031aa291b6414be7/Akuanduba-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0dc62f62a6b4a65e2c1992e68d5ee28b", "sha256": "9ce9967525c1a7e60cefc54822daf1ff032b600b3de34f4d67d1bddd0add053b" }, "downloads": -1, "filename": "Akuanduba-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0dc62f62a6b4a65e2c1992e68d5ee28b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14195, "upload_time": "2019-08-07T21:08:18", "url": "https://files.pythonhosted.org/packages/4d/75/9a0a3d1b820c0bb86c553b19f72b3afc48f0a4c6f2415dd40e7eed152eae/Akuanduba-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "149076d648c75b90f842613a0bd16edb", "sha256": "e6af0a6f7b88fd2ef08c7a5536137e449aba9632961e1c0ea8a280c5062d184b" }, "downloads": -1, "filename": "Akuanduba-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "149076d648c75b90f842613a0bd16edb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 48021, "upload_time": "2019-08-29T17:59:08", "url": "https://files.pythonhosted.org/packages/c4/22/41901eb9849e52cfcae98e2a3e583521ed613cd26c3835c3498fb123df58/Akuanduba-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d0f065eeaea8ce894ffd45bf370deb36", "sha256": "17fd496461837cc22d4f2f5dad37cef5520e8f942bda137021415174b10553cc" }, "downloads": -1, "filename": "Akuanduba-0.1.6.tar.gz", "has_sig": false, "md5_digest": "d0f065eeaea8ce894ffd45bf370deb36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16117, "upload_time": "2019-08-29T17:59:10", "url": "https://files.pythonhosted.org/packages/1d/eb/8924cbbb524f39558dbdb0503e2c16dcfb795ac0e89fa92c695b6801e278/Akuanduba-0.1.6.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3972616bf5668be8a95a7557c013337a", "sha256": "68c99d2f2aa1cd359970c833d1e7cc41d240e866af16f91f96c98cedabc5a3ec" }, "downloads": -1, "filename": "Akuanduba-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3972616bf5668be8a95a7557c013337a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 49526, "upload_time": "2019-10-09T16:24:58", "url": "https://files.pythonhosted.org/packages/5d/e4/6c8aead82744b438cdb29def5a2369d9063076b59e5c7a14f4921eb04713/Akuanduba-0.2.0-py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a1caeb8f9772e819cfe33c0bd8cd0cb8", "sha256": "18c5c7b89c1c4200f7521362e0cec0fd15f2e68bd7e5d255c8b4f92b543a2389" }, "downloads": -1, "filename": "Akuanduba-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a1caeb8f9772e819cfe33c0bd8cd0cb8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 49552, "upload_time": "2019-10-10T17:07:07", "url": "https://files.pythonhosted.org/packages/4c/8d/4669be65537b924a82f1bf245acdeb939b1be64e1447f31afed41c535d88/Akuanduba-0.2.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1caeb8f9772e819cfe33c0bd8cd0cb8", "sha256": "18c5c7b89c1c4200f7521362e0cec0fd15f2e68bd7e5d255c8b4f92b543a2389" }, "downloads": -1, "filename": "Akuanduba-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a1caeb8f9772e819cfe33c0bd8cd0cb8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 49552, "upload_time": "2019-10-10T17:07:07", "url": "https://files.pythonhosted.org/packages/4c/8d/4669be65537b924a82f1bf245acdeb939b1be64e1447f31afed41c535d88/Akuanduba-0.2.1-py3-none-any.whl" } ] }