{ "info": { "author": "Thomas Weholt", "author_email": "thomas@weholt.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "Avacado\r\n=======\r\n\r\nVersion : 0.2.0\r\nAuthor : Thomas Weholt \r\nLicense : GPL v3.0\r\nWWW : https://bitbucket.org/weholt/django-avacado\r\nStatus : Experimental/Alpha/Proof-of-concept.\r\n\r\n\r\nAbout\r\n-----\r\nDeliciously delayed and cached database logging for django.\r\n\r\nFYI: The code is still in early alpha stage of development so beware.\r\n\r\nNB! It sorta looks like the std module logger in python, but it's not.\r\nThis is that one time that even if it looks like a duck and quacks like a duck, \r\nit's still not a duck.\r\n\r\nThe code has so far only been tested using SQLite, Django 1.3, Python 2.6.6 on\r\nUbuntu 10.10.\r\n\r\nUsage\r\n-----\r\nAvocado is meant to be used when you want to log huge amounts of log entries\r\nrelated to the same context, store the log in the db for easy sorting and viewing,\r\nand not have the performance hit of using the django orm.\r\n\r\nYou might do something like this in your view::\r\n\r\n from avocado.context import get_context\r\n \r\n with get_context(\"filescanning\") as log:\r\n for filename in somefilescanningmethod():\r\n # do something with the file and store some information about it\r\n log.info(\"Did something to %s.\" % filename)\r\n \r\nYou can also log information and add an instance of a django model. In the admin\r\nyou can see the log and click to go directly to the related model::\r\n\r\n with get_context(\"UserProcessing\") as log:\r\n for usr in User.objects.all():\r\n # do something with the user and store some information about it\r\n log.info(\"Did something to %s.\" % user, instance=user)\r\n\r\n\r\nYou can also log exceptions and avocado will try to log more than just the name\r\nof the exception being raised, but this not formatted very pretty at the moment\r\nand the code seems to bring along a lot of useless info. Still, here's how to test it::\r\n\r\n with get_context(\"UserProcessing\") as log:\r\n try:\r\n a = 0\r\n b = 2\r\n c = b / a\r\n except Exception, e:\r\n log.exception(\"Math exception: %s\" % e)\r\n \r\nYou don't have to pass the exception along. Avocado will dig out lots of stuff for you.\r\n\r\n\r\nInstallation\r\n------------\r\n\r\npip install django-avocado\r\n\r\nor\r\n\r\nhg clone https://bitbucket.org/weholt/django-avacado\r\npython setup.py install\r\n\r\nAdd avocado to INSTALLED_APPS. You might have to copy or symlink to the templates\r\nin the avocado-folder, but I don't think so.\r\n\r\n\r\nRequirements\r\n------------\r\n* django\r\n* dse\r\n\r\nChangelog\r\n---------\r\n0.2.0 : Rewrote some to be compatible with the latest release of DSE.\r\n0.1.0 : Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/weholt/django-avocado", "keywords": "cached logging database django", "license": "GPL v.3", "maintainer": null, "maintainer_email": null, "name": "Django-Avocado", "package_url": "https://pypi.org/project/Django-Avocado/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Django-Avocado/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/weholt/django-avocado" }, "release_url": "https://pypi.org/project/Django-Avocado/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Delicious delayed and cached database-logging for django.", "version": "0.2.0" }, "last_serial": 784132, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "808227a7c314f0201303abdacf8735a5", "sha256": "3fdf9585df5f4e60a63598c330d4901226b290d0778ca734f6981bece0408a29" }, "downloads": -1, "filename": "Django-Avocado-0.1.0.tar.gz", "has_sig": false, "md5_digest": "808227a7c314f0201303abdacf8735a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20491, "upload_time": "2011-04-30T03:15:21", "url": "https://files.pythonhosted.org/packages/e0/14/0531e59be7bc977ee37e18410d12fcc5ad5c5c8c5b675857f8bbf199ea6a/Django-Avocado-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ffc808933bb000013f3f550a1d17dcf8", "sha256": "5230c5f71f21432b340bcf62188124e27b79bf54dc9bb5d0d6046f0407349250" }, "downloads": -1, "filename": "Django-Avocado-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ffc808933bb000013f3f550a1d17dcf8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20497, "upload_time": "2011-04-30T03:19:01", "url": "https://files.pythonhosted.org/packages/f1/ae/ff3678c3e278ab6a4c69c88bd8e1b693667fe8bad6be238b3b0918ca3fd1/Django-Avocado-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ecd0f083f2db98336a94df73eb8677f5", "sha256": "e9370e4862092e1ce9f735e4be4d65b28304043196e05c4413d55dd6297768c1" }, "downloads": -1, "filename": "Django-Avocado-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ecd0f083f2db98336a94df73eb8677f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18147, "upload_time": "2011-05-01T23:59:00", "url": "https://files.pythonhosted.org/packages/3d/06/70ebb4da34d0d63e12c379276c33bb404ad57a0da6d973e1a5061c570b8f/Django-Avocado-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ecd0f083f2db98336a94df73eb8677f5", "sha256": "e9370e4862092e1ce9f735e4be4d65b28304043196e05c4413d55dd6297768c1" }, "downloads": -1, "filename": "Django-Avocado-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ecd0f083f2db98336a94df73eb8677f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18147, "upload_time": "2011-05-01T23:59:00", "url": "https://files.pythonhosted.org/packages/3d/06/70ebb4da34d0d63e12c379276c33bb404ad57a0da6d973e1a5061c570b8f/Django-Avocado-0.2.0.tar.gz" } ] }