{ "info": { "author": "Russell Ballestrini", "author_email": "russell@ballestrini.net", "bugtrack_url": null, "classifiers": [], "description": "What are human readable timedeltas? \n===============================================\n\nago.py makes customizable human readable timedeltas, for example:\n\nTesting past tense::\n\n Russell commented 1 year, 127 days, 16 hours ago\n You replied 1 year, 127 days ago\n\nTesting future tense::\n\n Program will shutdown in 2 days, 3 hours, 27 minutes\n Job will run 2 days, 3 hours from now\n\n\nHow to install\n===================\n\nThere are a number of ways to install this package.\n\nYou could run this ad hoc command::\n\n pip install ago\n\nor specify *ago* under the *setup_requires* list within your\n*setuptools*-compatible project's *setup.py* file.\n\n\nHow to use\n==================\n\nThe ago module comes with three functions: \n\n#. human\n#. delta2dict\n#. get_delta_from_subject\n\nYou really only need to worry about *human*.\n\nHere are all the available arguments and defaults::\n\n human(subject, precision=2, past_tense='{} ago', future_tense='in {}', abbreviate=False):\n\nsubject\n a datetime, timedelta, or timestamp (integer/float) object to become human readable\n\nprecision (default 2):\n the desired amount of unit precision\n\npast_tense (default '{} ago'):\n the format string used for a past timedelta\n\nfuture_tense (default 'in {}'):\n the format string used for a future timedelta\n\nabbreviate (default False):\n boolean to abbreviate units\n\nHere is an example on how to use *human*::\n\n from ago import human\n from ago import delta2dict\n \n from datetime import datetime\n from datetime import timedelta\n\n # pretend this was stored in database\n db_date = datetime(year=2010, month=5, day=4, hour=6, minute=54, second=33, microsecond=4000)\n\n # to find out how long ago, use the human function\n print 'Created ' + human( db_date )\n \n # optionally pass a precision\n print 'Created ' + human( db_date, 3 )\n print 'Created ' + human( db_date, 6 )\n\nWe also support future dates and times::\n\n PRESENT = datetime.now()\n PAST = PRESENT - timedelta( 492, 58711, 45 ) # days, secs, ms\n FUTURE = PRESENT + timedelta( 2, 12447, 963 ) # days, secs, ms\n\n print human( FUTURE )\n\nExample past_tense and future_tense keyword arguments::\n\n output1 = human( PAST,\n past_tense = 'titanic sunk {0} ago',\n future_tense = 'titanic will sink in {0} from now'\n )\n\n output2 = human( FUTURE,\n past_tense = 'titanic sunk {0} ago',\n future_tense = 'titanic will sink in {0} from now'\n )\n\n print output1\n # titanic sunk 1 year, 127 days ago\n print output2\n # titanic will sink in 2 days, 3 hours from now\n\n\nNeed more examples?\n==========================\n\nYou should look at test_ago.py\n\n\nHow do I thank you?\n==========================\n\nYou should follow me on twitter http://twitter.com/russellbal\n\n\nLicense\n=========================\n\nPublic Domain\n\n\nPublic Revision Control\n==============================\n\nhttps://bitbucket.org/russellballestrini/ago\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/russellballestrini/ago/src", "keywords": "ago human readable time deltas timedelta datetime timestamp", "license": "Public Domain", "maintainer": "", "maintainer_email": "", "name": "ago", "package_url": "https://pypi.org/project/ago/", "platform": "All", "project_url": "https://pypi.org/project/ago/", "project_urls": { "Homepage": "https://bitbucket.org/russellballestrini/ago/src" }, "release_url": "https://pypi.org/project/ago/0.0.93/", "requires_dist": null, "requires_python": "", "summary": "ago: Human readable timedeltas", "version": "0.0.93" }, "last_serial": 4347776, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7f9a2daf951556bd87556cb7a0784d50", "sha256": "825df010fe94fe9b4564ac6ca1da0541ba3479a0b5abc62a5cf0625ff581bd11" }, "downloads": -1, "filename": "ago-0.0.1-py2.7.egg", "has_sig": false, "md5_digest": "7f9a2daf951556bd87556cb7a0784d50", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 2634, "upload_time": "2012-06-30T01:22:03", "url": "https://files.pythonhosted.org/packages/22/61/18fe87a79191e1438a223e375bb4f4c44dfa625c0803d7b2829ec0cf107e/ago-0.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "44257d6c97edb8916838fcee34c2a705", "sha256": "45a7095cdbb696bf9f80bfe25b7c98ae8d0a45f40f1aa46326b42df0e2cd34a9" }, "downloads": -1, "filename": "ago-0.0.1.tar.gz", "has_sig": false, "md5_digest": "44257d6c97edb8916838fcee34c2a705", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1530, "upload_time": "2012-06-30T01:22:02", "url": "https://files.pythonhosted.org/packages/bd/86/fd422500ce335aa70e6a0dfca830f4b4c09b77f8edfe445510b51e87771f/ago-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "22010c0ffe5b14cfb4623a1d2e355884", "sha256": "097917594b1d40a562b886c10a96973288fea7773abeee45911d7ffc8bf079ce" }, "downloads": -1, "filename": "ago-0.0.2-py2.7.egg", "has_sig": false, "md5_digest": "22010c0ffe5b14cfb4623a1d2e355884", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 2950, "upload_time": "2012-06-30T01:53:33", "url": "https://files.pythonhosted.org/packages/82/9b/25409d8fe0096f36e4bb21ddcf670b702eb7c820bf35b9049ea4dc6b2dc0/ago-0.0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "afe0e91cf230ff2d4e662ae41c8ce88d", "sha256": "cf60be219846e4aead195dc5fff0eba85b9abf3e7740384fc09132889be73958" }, "downloads": -1, "filename": "ago-0.0.2.tar.gz", "has_sig": false, "md5_digest": "afe0e91cf230ff2d4e662ae41c8ce88d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1970, "upload_time": "2012-06-30T01:53:31", "url": "https://files.pythonhosted.org/packages/89/dc/e2e8cfc404305c2ceef6114ae78bccf29f32b00b2f05bc4a78bee364b71f/ago-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "15d7284d30a93877ebed1a978b6d587f", "sha256": "af10daed5701016ecd7d9f1abdc62ee3b78a7ed27f2795305384c3b769679be8" }, "downloads": -1, "filename": "ago-0.0.3-py2.7.egg", "has_sig": false, "md5_digest": "15d7284d30a93877ebed1a978b6d587f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3243, "upload_time": "2012-07-29T15:28:19", "url": "https://files.pythonhosted.org/packages/77/98/84de8de089937b0df6342ec52333eef106fb3bf7cc00fb4b2017769050c7/ago-0.0.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "72115c3ea32c8717c9f7d532e61a7284", "sha256": "ea3e570180aeab2433804decd4c9e0a501d553a2e34a20f07eb91e3e145f3736" }, "downloads": -1, "filename": "ago-0.0.3.tar.gz", "has_sig": false, "md5_digest": "72115c3ea32c8717c9f7d532e61a7284", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2183, "upload_time": "2012-07-29T15:28:18", "url": "https://files.pythonhosted.org/packages/dc/c7/ed287035f9b9c45fdb26850217ad63ccffbbdcb89ee2c44489ae11c30fde/ago-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "5d1c6ea51cdb75a79ec087c303557f34", "sha256": "af676c98a970ef447bd670f19f9bdf6b75af70da197530ff01df5136f8154005" }, "downloads": -1, "filename": "ago-0.0.4-py2.7.egg", "has_sig": false, "md5_digest": "5d1c6ea51cdb75a79ec087c303557f34", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3740, "upload_time": "2013-01-09T04:03:20", "url": "https://files.pythonhosted.org/packages/99/0f/310bec854e75130ed3c7899fc3dfc2fbd8025c66516661ff23c1fa9d9827/ago-0.0.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "85534ac6fcf331f32e2aaed8ad7716b5", "sha256": "65a61509a660bd507f281c9d036d474e3258c9fae53bd8f82d2cf024d61e8210" }, "downloads": -1, "filename": "ago-0.0.4.tar.gz", "has_sig": false, "md5_digest": "85534ac6fcf331f32e2aaed8ad7716b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2640, "upload_time": "2013-01-09T04:03:19", "url": "https://files.pythonhosted.org/packages/0a/6c/e20c49c4ed5857da85b22d9b1f79f3ae8091c43ccfad8a23480f6c4da719/ago-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "72a59ab8e6b1527a15c92b3d6f624e24", "sha256": "a5747253fe7c154095778ad37e6ad82a226711bfffc7f6612b2febf56cca762b" }, "downloads": -1, "filename": "ago-0.0.5-py2.7.egg", "has_sig": false, "md5_digest": "72a59ab8e6b1527a15c92b3d6f624e24", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3708, "upload_time": "2013-01-12T20:28:54", "url": "https://files.pythonhosted.org/packages/d2/54/f362df13b830b2cce1b9dc5a8e7eddc3ed3287716751fecb6240708c86de/ago-0.0.5-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "b10434275958edf61254a43adf4662f2", "sha256": "a8c41aad358fc4455b699237fa1e633b711959800341289337756af084bd4837" }, "downloads": -1, "filename": "ago-0.0.5.tar.gz", "has_sig": false, "md5_digest": "b10434275958edf61254a43adf4662f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2953, "upload_time": "2013-01-12T20:28:53", "url": "https://files.pythonhosted.org/packages/69/66/8d888be362e0dcc8e2e0d4de75059b599d8234e2ddb04e5326b177e16eaa/ago-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "9751560a305e2475fdb69d1a2e57ee6b", "sha256": "15e71b3fe89673a2d6d6b79b4f2f9a5656ecc4036375c3788202e2bc7d136bb9" }, "downloads": -1, "filename": "ago-0.0.6-py2.7.egg", "has_sig": false, "md5_digest": "9751560a305e2475fdb69d1a2e57ee6b", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3614, "upload_time": "2014-02-25T16:58:23", "url": "https://files.pythonhosted.org/packages/32/bb/700504ee8e1f9394a8cffcc298c778f0b605e08ffa4515d6647068718f36/ago-0.0.6-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "e2fdc21fb922b4fc21ec19c6eac6bd46", "sha256": "a64811a5a44cd3ba687d800986edf0f7a97859b8da75d3347c915b58b0869b44" }, "downloads": -1, "filename": "ago-0.0.6.tar.gz", "has_sig": false, "md5_digest": "e2fdc21fb922b4fc21ec19c6eac6bd46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2937, "upload_time": "2014-02-25T16:58:21", "url": "https://files.pythonhosted.org/packages/24/24/00a3e8d9a263091e695fad26e4090d1e9cab1ee5f3fd2ab698a19b9b4539/ago-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "7bb3e6b867bdb1ccda5482829699c69f", "sha256": "396f10c49aed8551689e85554e81c3b585136f1bcfaa9dc97162b1f1a2629da6" }, "downloads": -1, "filename": "ago-0.0.7-py2.7.egg", "has_sig": false, "md5_digest": "7bb3e6b867bdb1ccda5482829699c69f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3758, "upload_time": "2016-02-02T04:25:11", "url": "https://files.pythonhosted.org/packages/7b/48/723379c479ad4b19b36e3cbcd1d253482b747c0782dfbe4e11deb3e68eca/ago-0.0.7-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "484b79fe9faa985244b4b05880ea680b", "sha256": "1ebae32d9d88d245718421275b962d84527fa41ae7b047f09fe0ff3dc4c1063c" }, "downloads": -1, "filename": "ago-0.0.7.tar.gz", "has_sig": false, "md5_digest": "484b79fe9faa985244b4b05880ea680b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2992, "upload_time": "2016-02-02T04:25:01", "url": "https://files.pythonhosted.org/packages/15/a9/e8218d8416696d95d793794de13c5454a5125f99a2b466835ee0ccf0a0c8/ago-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "37f09df4e34118e1d2dbc88898cfa7dc", "sha256": "c5491e06f2c60a44d0b27e1ed48e0e8050a5d65f3bd2d25854209d4de4ef11cc" }, "downloads": -1, "filename": "ago-0.0.8-py2.7.egg", "has_sig": false, "md5_digest": "37f09df4e34118e1d2dbc88898cfa7dc", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 3908, "upload_time": "2016-07-10T18:33:00", "url": "https://files.pythonhosted.org/packages/2a/0c/36a3298aad1e2a358a006162abc652625d80c3e4ea8b24f746a2674c5358/ago-0.0.8-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "a770fabf742cc308608b7d5f9dbd624c", "sha256": "a4f785a9bfe0ffa4416fa817e5d858102802ec8ce752e0c137588c99d9c3d62f" }, "downloads": -1, "filename": "ago-0.0.8.tar.gz", "has_sig": false, "md5_digest": "a770fabf742cc308608b7d5f9dbd624c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3107, "upload_time": "2016-07-10T18:32:56", "url": "https://files.pythonhosted.org/packages/cd/32/1f5b15a8ab6201d309de5c94bc745d76543345a745877b886bd641a32ecb/ago-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "f9563daa258b28a61447ff37004327ee", "sha256": "2e079abc781119a9f18451c89ee65dc82e9cdf2035d720e07349e27e1ec52bcd" }, "downloads": -1, "filename": "ago-0.0.9-py2.7.egg", "has_sig": false, "md5_digest": "f9563daa258b28a61447ff37004327ee", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4321, "upload_time": "2016-09-21T20:35:12", "url": "https://files.pythonhosted.org/packages/90/32/c3514b4b4d1befc4926a64819454b92e7bee7ef1a0a0e898c050a07a756b/ago-0.0.9-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "ebe4555b05151a69c6e3c52dcd155284", "sha256": "18ab19c41374e6eb55fd9b9d19e988c6dd7033818bb3cd7600269475ba657601" }, "downloads": -1, "filename": "ago-0.0.9.tar.gz", "has_sig": false, "md5_digest": "ebe4555b05151a69c6e3c52dcd155284", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3134, "upload_time": "2016-09-21T20:35:10", "url": "https://files.pythonhosted.org/packages/83/1a/17e89f0be2cf69e17fbc96012bd6a2bf6d88a8fd3ac79854cc7007971943/ago-0.0.9.tar.gz" } ], "0.0.91": [ { "comment_text": "", "digests": { "md5": "65cacad06ddb7f59f0ce2bcf29d1f3dc", "sha256": "b9f3fc7981d3afed288ee2787c138dc5886544ea1ef786d49f6083732a4303a6" }, "downloads": -1, "filename": "ago-0.0.91-py2.7.egg", "has_sig": false, "md5_digest": "65cacad06ddb7f59f0ce2bcf29d1f3dc", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4315, "upload_time": "2017-10-15T00:17:07", "url": "https://files.pythonhosted.org/packages/7e/85/e5e8ff038f82993f74312b66d4784331096183438157511c7b4f0f45d0ab/ago-0.0.91-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8547ad44bec4ac81a478a3299e865f0d", "sha256": "3019432ad19e88df70fb05844b03f250421b2ca5c6025fc6f44c5cad1ad8248d" }, "downloads": -1, "filename": "ago-0.0.91.tar.gz", "has_sig": false, "md5_digest": "8547ad44bec4ac81a478a3299e865f0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3141, "upload_time": "2017-10-15T00:17:05", "url": "https://files.pythonhosted.org/packages/e9/0c/03bdd6710493cecd3a656263fac2f00d0cdb2e8ccb02eaff09557560c213/ago-0.0.91.tar.gz" } ], "0.0.92": [ { "comment_text": "", "digests": { "md5": "d928fddc03aebac80f92cd8031e1aeb5", "sha256": "aaba95a800e96aa50173d5fa32f3870dc9faa7355cb8b493ddfc7aad7259c4e8" }, "downloads": -1, "filename": "ago-0.0.92-py2.7.egg", "has_sig": false, "md5_digest": "d928fddc03aebac80f92cd8031e1aeb5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4401, "upload_time": "2017-10-15T00:50:13", "url": "https://files.pythonhosted.org/packages/a1/f5/505d4fd71a9c483188ca8aba7fd80791a82ea0b717a480ba5be2dc44bbe9/ago-0.0.92-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "f10649e11354095431743339d5d44c4b", "sha256": "81e838ef978a19f8a263e72e4ae75345b639943e9853b33c4572b04b1d6f01f9" }, "downloads": -1, "filename": "ago-0.0.92.tar.gz", "has_sig": false, "md5_digest": "f10649e11354095431743339d5d44c4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3175, "upload_time": "2017-10-15T00:50:12", "url": "https://files.pythonhosted.org/packages/91/55/5d331ec8cf051af8e6e1ba8ec9df80c0f642623f1d203f05403ad381c09e/ago-0.0.92.tar.gz" } ], "0.0.93": [ { "comment_text": "", "digests": { "md5": "4940341e2e940dae81add8fa3bbf927a", "sha256": "6f060596a90c6ec33c2e806bcc3146e7e7bfda7e90ca5c11b579c5bf03baf6fa" }, "downloads": -1, "filename": "ago-0.0.93-py2.7.egg", "has_sig": false, "md5_digest": "4940341e2e940dae81add8fa3bbf927a", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4534, "upload_time": "2018-10-06T19:08:36", "url": "https://files.pythonhosted.org/packages/72/70/cf287cdb4a90f8c2225d8d04e3ce68ae41e7c72383f77031d8cca26b914d/ago-0.0.93-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "25b1e106be826e2a9203cfa88da106d0", "sha256": "9d1956edd8103c266d968ae2a7eaf2f23470b6384e655aaaf54d1158408178ad" }, "downloads": -1, "filename": "ago-0.0.93.tar.gz", "has_sig": false, "md5_digest": "25b1e106be826e2a9203cfa88da106d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3262, "upload_time": "2018-10-06T19:08:34", "url": "https://files.pythonhosted.org/packages/f8/4e/976bd88566b0feec295873c3aa5a8712219edb2c07c7f6723c831e8840bd/ago-0.0.93.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4940341e2e940dae81add8fa3bbf927a", "sha256": "6f060596a90c6ec33c2e806bcc3146e7e7bfda7e90ca5c11b579c5bf03baf6fa" }, "downloads": -1, "filename": "ago-0.0.93-py2.7.egg", "has_sig": false, "md5_digest": "4940341e2e940dae81add8fa3bbf927a", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 4534, "upload_time": "2018-10-06T19:08:36", "url": "https://files.pythonhosted.org/packages/72/70/cf287cdb4a90f8c2225d8d04e3ce68ae41e7c72383f77031d8cca26b914d/ago-0.0.93-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "25b1e106be826e2a9203cfa88da106d0", "sha256": "9d1956edd8103c266d968ae2a7eaf2f23470b6384e655aaaf54d1158408178ad" }, "downloads": -1, "filename": "ago-0.0.93.tar.gz", "has_sig": false, "md5_digest": "25b1e106be826e2a9203cfa88da106d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3262, "upload_time": "2018-10-06T19:08:34", "url": "https://files.pythonhosted.org/packages/f8/4e/976bd88566b0feec295873c3aa5a8712219edb2c07c7f6723c831e8840bd/ago-0.0.93.tar.gz" } ] }