{ "info": { "author": "Ryan Anguiano", "author_email": "ryan.anguiano@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "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 :: 3.6" ], "description": "===============================\nRedis Timeseries\n===============================\n\n\nTime series API built on top of Redis that can be used to store and query\ntime series statistics. Multiple time granularities can be used to keep\ntrack of different time intervals.\n\n\n.. image:: https://img.shields.io/pypi/v/redis_timeseries.svg\n :target: https://pypi.python.org/pypi/redis_timeseries\n\n.. image:: https://api.travis-ci.org/ryananguiano/python-redis-timeseries.svg?branch=master\n :target: https://travis-ci.org/ryananguiano/python-redis-timeseries\n\n.. image:: https://readthedocs.org/projects/redis-timeseries/badge/?version=latest\n :target: https://redis-timeseries.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/ryananguiano/python-redis-timeseries/shield.svg\n :target: https://pyup.io/repos/github/ryananguiano/python-redis-timeseries/\n :alt: Updates\n\n\n* Free software: MIT license\n* Documentation: https://redis-timeseries.readthedocs.io.\n\nInstall\n-------\n\nTo install Redis Timeseries, run this command in your terminal:\n\n.. code-block:: console\n\n $ pip install redis_timeseries\n\n\nUsage\n-----\n\nTo initialize the TimeSeries class, you must pass a Redis client to\naccess the database. You may also override the base key for the time series.\n\n >>> import redis\n >>> client = redis.StrictRedis()\n >>> ts = TimeSeries(client, base_key='my_timeseries')\n\nTo customize the granularities, make sure each granularity has a ``ttl``\nand ``duration`` in seconds. You can use the helper functions for\neasier definitions.\n\n >>> my_granularities = {\n ... '1minute': {'ttl': hours(1), 'duration': minutes(1)},\n ... '1hour': {'ttl': days(7), 'duration': hours(1)}\n ... }\n >>> ts = TimeSeries(client, granularities=my_granularities)\n\n``.record_hit()`` accepts a key and an optional timestamp and increment\ncount. It will record the data in all defined granularities.\n\n >>> ts.record_hit('event:123')\n >>> ts.record_hit('event:123', datetime(2017, 1, 1, 13, 5))\n >>> ts.record_hit('event:123', count=5)\n\n``.record_hit()`` will automatically execute when ``execute=True``. If you\nset ``execute=False``, you can chain the commands into a single redis\npipeline. You must then execute the pipeline with ``.execute()``.\n\n >>> ts.record_hit('event:123', execute=False)\n >>> ts.record_hit('enter:123', execute=False)\n >>> ts.record_hit('exit:123', execute=False)\n >>> ts.execute()\n\n``.get_hits()`` will query the database for the latest data in the\nselected granularity. If you want to query the last 3 minutes, you\nwould query the ``1minute`` granularity with a count of 3. This will return\na list of tuples ``(bucket, count)`` where the bucket is the rounded timestamp.\n\n >>> ts.get_hits('event:123', '1minute', 3)\n [(datetime(2017, 1, 1, 13, 5), 1), (datetime(2017, 1, 1, 13, 6), 0), (datetime(2017, 1, 1, 13, 7), 3)]\n\n``.get_total_hits()`` will query the database and return only a sum of all\nthe buckets in the query.\n\n >>> ts.get_total_hits('event:123', '1minute', 3)\n 4\n\n``.scan_keys()`` will return a list of keys that could exist in the\nselected range. You can pass a search string to limit the keys returned.\nThe search string should always have a ``*`` to define the wildcard.\n\n >>> ts.scan_keys('1minute', 10, 'event:*')\n ['event:123', 'event:456']\n\n\nFeatures\n--------\n\n* Multiple granularity tracking\n* Redis pipeline chaining\n* Key scanner\n* Easy to integrate with charting packages\n* Can choose either integer or float counting\n* Date bucketing with timezone support\n\nCredits\n-------\n\nAlgorithm copied from `tonyskn/node-redis-timeseries`_\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _`tonyskn/node-redis-timeseries`: https://github.com/tonyskn/node-redis-timeseries\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n\n=======\nHistory\n=======\n\n0.1.8 (2017-07-25)\n------------------\n\n* Fix bug in _round_time() method\n\n0.1.7 (2017-07-25)\n------------------\n\n* Fix bug in _round_time() method\n\n0.1.6 (2017-07-25)\n------------------\n\n* Add timezone so day buckets will start at midnight in the correct timezone\n\n0.1.5 (2017-07-18)\n------------------\n\n* Update default granularities\n\n0.1.4 (2017-07-12)\n------------------\n\n* Add float value capabilities\n* Add increase() and decrease() methods\n* Move get_hits() -> get_buckets() and get_total_hits() -> get_total()\n\n0.1.3 (2017-03-30)\n------------------\n\n* Remove six package\n* Clean up source file\n\n0.1.2 (2017-03-30)\n------------------\n\n* Make Python 3 compatible\n* Fix tox to make PyPy work\n\n0.1.1 (2017-03-30)\n------------------\n\n* Minor project file updates\n\n0.1.0 (2017-03-30)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ryananguiano/python-redis-timeseries", "keywords": "redis_timeseries", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "redis-timeseries", "package_url": "https://pypi.org/project/redis-timeseries/", "platform": "", "project_url": "https://pypi.org/project/redis-timeseries/", "project_urls": { "Homepage": "https://github.com/ryananguiano/python-redis-timeseries" }, "release_url": "https://pypi.org/project/redis-timeseries/0.1.9/", "requires_dist": [ "redis" ], "requires_python": "", "summary": "Timeseries API built on top of Redis", "version": "0.1.9" }, "last_serial": 5317237, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "1976b9329f557a9a7233da7cbc744cb4", "sha256": "aca5dc72e25f1090a8bdf9545f08c67f3615873ca6ee252f358855c6269d24b4" }, "downloads": -1, "filename": "redis_timeseries-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1976b9329f557a9a7233da7cbc744cb4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7247, "upload_time": "2017-03-30T23:10:17", "url": "https://files.pythonhosted.org/packages/39/40/7006e6946631e90045b10972ae700689a2087a0a07d33682e852988c633b/redis_timeseries-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e552d222b9ee759e5d0791611e287ed5", "sha256": "fc7e4c7d08caf211f586b7f432b5dc449e15dd528f6537684ba91d6c4fec98d7" }, "downloads": -1, "filename": "redis_timeseries-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e552d222b9ee759e5d0791611e287ed5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21995, "upload_time": "2017-03-30T23:10:01", "url": "https://files.pythonhosted.org/packages/62/04/10e3669c2d30b2aac8b95ec542f257a6bd86dbb649267e18ab46f08ebc0d/redis_timeseries-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6f72681abc2cb52b396047277dc48fe2", "sha256": "2aa2dd7ae157c97addbdf18bbbf3153108d01d4ae762a2f82ccaf545dffa3c0a" }, "downloads": -1, "filename": "redis_timeseries-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6f72681abc2cb52b396047277dc48fe2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7396, "upload_time": "2017-03-31T00:05:19", "url": "https://files.pythonhosted.org/packages/7d/dd/149e4cdf51a1211e99031f7ac9bc2de4bf1d4d7d6e95c065e97d8f5e9b2f/redis_timeseries-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "81fd3a37245fe2f9b6dc1559f275a5f7", "sha256": "05dc4f8c1d8660fcc8c21283a70d70bd2ce5c3a433af39696f824ae576b867d1" }, "downloads": -1, "filename": "redis_timeseries-0.1.2.tar.gz", "has_sig": false, "md5_digest": "81fd3a37245fe2f9b6dc1559f275a5f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18920, "upload_time": "2017-03-31T00:05:17", "url": "https://files.pythonhosted.org/packages/67/b9/4d9b89242fe564b35bf81266727aad33fd5ed0b1bcde31c36328ab0056d5/redis_timeseries-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2146c2a07fcd0bccf78acb6f561c741e", "sha256": "b9d9b3c064eeb71051985fdcb00bdd807806093e9197bf9e3249b1cbeb1f912f" }, "downloads": -1, "filename": "redis_timeseries-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2146c2a07fcd0bccf78acb6f561c741e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6613, "upload_time": "2017-03-31T01:31:40", "url": "https://files.pythonhosted.org/packages/c2/92/ec63ff75b986eee2ac0eda1a5c35e0ad75d0bc07c43cd30178b3e4ec8e9e/redis_timeseries-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d6c5df3d819c71ca4120c2447f377805", "sha256": "31fe4298c7647f10df680c89baac7498973275f3e219241b5978d8890ecb52af" }, "downloads": -1, "filename": "redis_timeseries-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d6c5df3d819c71ca4120c2447f377805", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18807, "upload_time": "2017-03-31T01:31:38", "url": "https://files.pythonhosted.org/packages/c2/3a/444dd3e487e8a68cd9344f9bbaf5c3adb425aaf39fe7dda1f513d72e9c69/redis_timeseries-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e7da5e4d0448da3c7bdd4083ac017a2f", "sha256": "0a51bfbd060dcf4e6bdb8fed78f0835cee8098c71edccc5037f5996079ff82da" }, "downloads": -1, "filename": "redis_timeseries-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e7da5e4d0448da3c7bdd4083ac017a2f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7079, "upload_time": "2017-07-12T20:48:11", "url": "https://files.pythonhosted.org/packages/d3/eb/3cf77a69113dbef6e8abf7ea81519f03a8fdfe4419476377887f6acf5f3b/redis_timeseries-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "afe082bb3428abfe4f7a010a9de872f1", "sha256": "edc49eaa7999aeb6391903d00c805447d5e758b0edf3a3393af966d06be468c4" }, "downloads": -1, "filename": "redis_timeseries-0.1.4.tar.gz", "has_sig": false, "md5_digest": "afe082bb3428abfe4f7a010a9de872f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19191, "upload_time": "2017-07-12T20:48:09", "url": "https://files.pythonhosted.org/packages/0d/fb/82fd52458579fe8261b8be09f4568151cfa14a06abf00d7a8787780f5598/redis_timeseries-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "4257767cfa96a22c31fe69ea343c84b9", "sha256": "d3473f61e34f94bb43a9a71341914449183d87a4022135292806610e5bbfc11d" }, "downloads": -1, "filename": "redis_timeseries-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4257767cfa96a22c31fe69ea343c84b9", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7095, "upload_time": "2017-07-18T20:10:03", "url": "https://files.pythonhosted.org/packages/7f/0a/79722f7c421086628d2923e0f8f17ff32bb2bc88f6ae4ea2ae2349d27859/redis_timeseries-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e6a9f51fc05d934ccb97952ca265639", "sha256": "4fd4c7c5b156f956f3a51cce64799626fe6fde5820b9a2c3e6002a775274af2f" }, "downloads": -1, "filename": "redis_timeseries-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0e6a9f51fc05d934ccb97952ca265639", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19228, "upload_time": "2017-07-18T20:10:01", "url": "https://files.pythonhosted.org/packages/88/a6/a8259dd5730a081a08f81b84b8c98f5f455f8acf23d1f6b867a14d9aea1c/redis_timeseries-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "692ed796f71c3b116e2161fca29ee5c2", "sha256": "55ece35c50535080513c5aead47a991dfc25c658b96ddd10c24706ad55e35bda" }, "downloads": -1, "filename": "redis_timeseries-0.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "692ed796f71c3b116e2161fca29ee5c2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7501, "upload_time": "2017-07-25T21:21:39", "url": "https://files.pythonhosted.org/packages/06/a8/d93c3d864cc66e6dfbed995c45bce958a912e3c8e86805122947e16eee32/redis_timeseries-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1641800331a1bbb53076d43732bb64b8", "sha256": "6c54e8d2fc70dbc99b34ab9dfecf1d8e5f3347995921e250642f7ad03b2eaca1" }, "downloads": -1, "filename": "redis_timeseries-0.1.6.tar.gz", "has_sig": false, "md5_digest": "1641800331a1bbb53076d43732bb64b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15641, "upload_time": "2017-07-25T21:21:41", "url": "https://files.pythonhosted.org/packages/62/68/edb983a39ecac79f6725b9d0b3fb856d947899b4b0708fc131da02b0f209/redis_timeseries-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "769914d13aad4bbb777929f77019b737", "sha256": "ac5db1aab2230a2930f84644eb79910d374ac0cf4c2e99a9fbb109c50cc1fb02" }, "downloads": -1, "filename": "redis_timeseries-0.1.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "769914d13aad4bbb777929f77019b737", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7575, "upload_time": "2017-07-25T22:42:42", "url": "https://files.pythonhosted.org/packages/60/59/dded90f61fc0c06225e55bc60051d76c5024fc749f0272080870053d1400/redis_timeseries-0.1.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "267d84014356b43f189323c86e910389", "sha256": "c7a42a3f522043c0dfd91113048fc0318dd8b3b6fa816439363dc4b9e2111c4f" }, "downloads": -1, "filename": "redis_timeseries-0.1.7.tar.gz", "has_sig": false, "md5_digest": "267d84014356b43f189323c86e910389", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15715, "upload_time": "2017-07-25T22:42:45", "url": "https://files.pythonhosted.org/packages/a1/ea/04c005c379233f506442d2b05d8d26c8836f2faa5336f55fc9d7a09b5785/redis_timeseries-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "ead2e0b762b49a3397cde73ea72b72cb", "sha256": "0b6673284133531f41e523bd81318b26a740ecc52e921fdb005a4e65d719770a" }, "downloads": -1, "filename": "redis_timeseries-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ead2e0b762b49a3397cde73ea72b72cb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7599, "upload_time": "2017-07-26T01:35:40", "url": "https://files.pythonhosted.org/packages/49/c1/f20ad25bf339dcf3f86ed636a8a693dcf64e4c4339e0d8ba203cdd49d010/redis_timeseries-0.1.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6e21f903056cfd33f7b01ea44f0811b3", "sha256": "d83d37c6fbd26ca13ed64ddc0f7618a86e3fd670a15c5edf078028387f561b03" }, "downloads": -1, "filename": "redis_timeseries-0.1.8.tar.gz", "has_sig": false, "md5_digest": "6e21f903056cfd33f7b01ea44f0811b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15847, "upload_time": "2017-07-26T01:35:42", "url": "https://files.pythonhosted.org/packages/85/35/653be72bfcfed8b1fb6b6636567595d10f56649b2cb2a388c8e5ff12b7db/redis_timeseries-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "520ff273e98fc2d4ef1aa55e4e3f44dc", "sha256": "477d992dc523bf1abab030b369d68aabaf02cd5f32a1ac79873f86234bca0e13" }, "downloads": -1, "filename": "redis_timeseries-0.1.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "520ff273e98fc2d4ef1aa55e4e3f44dc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5688, "upload_time": "2019-05-25T20:14:35", "url": "https://files.pythonhosted.org/packages/3f/67/e634172b6b85644fa53dadcfb4b111ee0c5fa1bac52415324906f35658e9/redis_timeseries-0.1.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e173c07f89abb3fb7f1a899d2180744a", "sha256": "20643f30f6821ef9ebcb28d020bf75d9552600aab07ba8e54b3d32b087f72933" }, "downloads": -1, "filename": "redis_timeseries-0.1.9.tar.gz", "has_sig": false, "md5_digest": "e173c07f89abb3fb7f1a899d2180744a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15132, "upload_time": "2019-05-25T20:14:37", "url": "https://files.pythonhosted.org/packages/03/d5/d5a6e034f441ff22ecbdb3198078a736c3b7824d43eb96267eebc369a2c5/redis_timeseries-0.1.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "520ff273e98fc2d4ef1aa55e4e3f44dc", "sha256": "477d992dc523bf1abab030b369d68aabaf02cd5f32a1ac79873f86234bca0e13" }, "downloads": -1, "filename": "redis_timeseries-0.1.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "520ff273e98fc2d4ef1aa55e4e3f44dc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5688, "upload_time": "2019-05-25T20:14:35", "url": "https://files.pythonhosted.org/packages/3f/67/e634172b6b85644fa53dadcfb4b111ee0c5fa1bac52415324906f35658e9/redis_timeseries-0.1.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e173c07f89abb3fb7f1a899d2180744a", "sha256": "20643f30f6821ef9ebcb28d020bf75d9552600aab07ba8e54b3d32b087f72933" }, "downloads": -1, "filename": "redis_timeseries-0.1.9.tar.gz", "has_sig": false, "md5_digest": "e173c07f89abb3fb7f1a899d2180744a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15132, "upload_time": "2019-05-25T20:14:37", "url": "https://files.pythonhosted.org/packages/03/d5/d5a6e034f441ff22ecbdb3198078a736c3b7824d43eb96267eebc369a2c5/redis_timeseries-0.1.9.tar.gz" } ] }