{ "info": { "author": "David Wolever", "author_email": "david@wolever.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: No Input/Output (Daemon)", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries" ], "description": "``dirt``: a comprehensive framework for building Python applications which are part of a service oriented architecture\r\n======================================================================================================================\r\n\r\n``dirt`` provides all the tools required to build long-running Python\r\napplications (\"services\") which can communicate over RPC.\r\n\r\nSpecifically, it provides:\r\n\r\n* Tools for exposing methods over RPC (using either a dirt custom protocol or\r\n ZeroRPC, including nicities like iPython tab completion).\r\n* A framework for creating long-running applications, and exposing their\r\n methods over RPC.\r\n* Tools for running multiple applications in one terminal, either for\r\n development or in production.\r\n* A simple syntax for defining applications (currently Django-style\r\n ``settings.py`` files are best supported, but ``.ini`` could easily be\r\n supported too).\r\n\r\nAn application can be as simple as::\r\n\r\n $ cat app.py\r\n import gevent\r\n import logging\r\n\r\n from dirt import DirtApp, runloop\r\n\r\n log = logging.getLogger(__name__)\r\n\r\n class PingAPI(object):\r\n def ping(self):\r\n return \"pong\"\r\n\r\n class PingApp(DirtApp):\r\n def get_api(self, edge, call):\r\n return PingAPI()\r\n\r\n class LongRunningApp(DirtApp):\r\n @runloop(log)\r\n def serve(self):\r\n ping_app = self.settings.get_api(\"ping\")\r\n while True:\r\n result = ping_app.ping()\r\n log.info(\"ping: %r\", result)\r\n gevent.sleep(1)\r\n\r\n $ cat settings.py\r\n from dirt import logging_default\r\n USE_RELOADER = False\r\n DIRT_APP_PIDFILE = \"/tmp/dirt-example-{app_name}.pid\"\r\n LOGGING = logging_default(\"/tmp/dirt-example-{app_name}.log\", root_level=\"INFO\")\r\n\r\n class PING:\r\n app_class = \"app.PingApp\"\r\n bind_url = \"zrpc+tcp://127.0.0.1:9990\"\r\n remote_url = bind_url\r\n\r\n class LONG_RUNNING:\r\n app_class = \"app.LongRunningApp\"\r\n\r\n $ ./run ping long_running\r\n 23:20:21.289 ping INFO dirt.app: binding to zrpc+tcp://127.0.0.1:9990...\r\n 23:20:21.477 long_running INFO app: ping: 'pong'\r\n 23:20:22.380 long_running INFO app: ping: 'pong'\r\n\r\n\r\nSome notes:\r\n\r\n* ``dirt`` plays well with others, integrating easily into existing projects.\r\n See the ``example_project/`` directory for a Django project which uses\r\n ``dirt``.\r\n* ``dirt`` depends on ``gevent==1.0``. In theory it should be possible for\r\n applications to use operating system threads, but this hasn't been tested.\r\n\r\n\r\nDevelopment Status\r\n------------------\r\n\r\n``dirt`` is used by Luminautics in a production environment, and has been\r\nincredibly stable for the last six months.\r\n\r\nThat said, there will likely be some undocumented assumptions which could\r\naffect other users, so some amount of testing should be done before trusting it\r\nin your production environment.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Luminautics/dirt", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dirt", "package_url": "https://pypi.org/project/dirt/", "platform": "", "project_url": "https://pypi.org/project/dirt/", "project_urls": { "Homepage": "https://github.com/Luminautics/dirt" }, "release_url": "https://pypi.org/project/dirt/0.2.1-unstable/", "requires_dist": null, "requires_python": null, "summary": "dirt is a comprehensive framework for building Python applications which are part of a service oriented architecture", "version": "0.2.1-unstable" }, "last_serial": 675284, "releases": { "0.2.1-unstable": [ { "comment_text": "", "digests": { "md5": "e5172042a44af9b75d8add296d8dfa12", "sha256": "bc95d4d684107570dd9981d0d2d1ae0e7f4a6249bda92542014ff6d3c1a7120d" }, "downloads": -1, "filename": "dirt-0.2.1-unstable.tar.gz", "has_sig": true, "md5_digest": "e5172042a44af9b75d8add296d8dfa12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43652, "upload_time": "2013-02-05T03:45:06", "url": "https://files.pythonhosted.org/packages/97/a4/d7e3438394148cff69bd567bc0181f5f36112ec2380301816b87cac87bae/dirt-0.2.1-unstable.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e5172042a44af9b75d8add296d8dfa12", "sha256": "bc95d4d684107570dd9981d0d2d1ae0e7f4a6249bda92542014ff6d3c1a7120d" }, "downloads": -1, "filename": "dirt-0.2.1-unstable.tar.gz", "has_sig": true, "md5_digest": "e5172042a44af9b75d8add296d8dfa12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43652, "upload_time": "2013-02-05T03:45:06", "url": "https://files.pythonhosted.org/packages/97/a4/d7e3438394148cff69bd567bc0181f5f36112ec2380301816b87cac87bae/dirt-0.2.1-unstable.tar.gz" } ] }