{ "info": { "author": "Kwangyeol Ryu", "author_email": "kwangyeolryu@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools" ], "description": "dts: Generate sequence of datetimes, like seq\n=============================================\n\n## Sequece of dates\n\n`dts` generate sequence of datetimes. \n\n```\n$ dts 20180401 20180403\n20180401\n20180402\n20180403\n```\n\nIf you do it using `seq`, it will like below.\n\n```bash\n$ seq 1 3\n1\n2\n3\n$ seq -f '%02g' 1 3 | xargs -I {} echo \"201804{}\"\n20180401\n20180402\n20180403\n```\n\n## Install\n\n```bash\npip install dts\n```\n\n\n## How to use: Simple\n\n```bash\n$ dts -h\nusage: dts [-h] [-i INTERVAL] [-f FORMAT] FIRST LAST\n\ndts is a seq util for datetimes\n\nExamples:\n\n $ dts 20180501 20180503\n 20180501\n 20180502\n 20180503\n\n $ dts 20180501-0900 20180501-1200 -i h1 -f '%Y-%m-%dT%H:%M:%S'\n 2018-05-01T09:00:00\n 2018-05-01T10:00:00\n 2018-05-01T11:00:00\n 2018-05-01T12:00:00\n\nGithub: https://github.com/KwangYeol/dts\n\npositional arguments:\n FIRST first date of the seq. For example, 2018-05-01, 20180501, 20180501-0900, 2018-05-01T09:00\n LAST last date of the seq. See also, FIRST\n\noptional arguments:\n -h, --help show this help message and exit\n -i INTERVAL, --interval INTERVAL\n interval: h1, d1, w1. default value is d1\n -f FORMAT, --format FORMAT\n see also, datetime.strftime\n```\n\n* `-i`: It has two parts. (time unit) + (interval). \n - time unit: `h` menas hours, `d` means days, and `w` menas weeks \n - interval: numbers\n - `h1` means 1-hour interval, `d3` means 3-day interval, etc.\n - default value is `d1`\n\n* `-f`: It has datetime format. See this (https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior)\n\n\n## How to use: with Pipeline\n\n```bash\n$ dts 20180401 20180430 -i d7\n20180401\n20180408\n20180415\n20180422\n20180429\n\n$ dts 20180510-0900 20180510-1400 -i h1 -f '%Y%m%d-%H00'\n20180510-0900\n20180510-1000\n20180510-1100\n20180510-1200\n20180510-1300\n20180510-1400\n\n$ dts 20180510-0900 20180510-1400 -i h1 -f '%Y-%m-%dT%H:00'\n2018-05-10T09:00\n2018-05-10T10:00\n2018-05-10T11:00\n2018-05-10T12:00\n2018-05-10T13:00\n2018-05-10T14:00\n```\n\n\n### How to use\n\nFor examle, you have hive table named `credit` which has daily partition `yyyymmdd` like below.\n\n```bash\nhadoop fs -ls /hive/warehouse/sales.db/credit/yyyymmdd=20180401\n```\n\nYou can find the data size in some range with `dts`.\n\n```bash\n$ dts 20180401 20180410 | xargs -I {} hadoop fs -ls /hive/warehouse/sales.db/credit/yyyymmdd={}\n```\n\n\n## Development\n\npython setup.py install\npython setup.py sdist \npython setup.py sdist bdist bdist_wheel\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/KwangYeol/dts", "keywords": "dts seq datetime generator", "license": "", "maintainer": "", "maintainer_email": "", "name": "dts", "package_url": "https://pypi.org/project/dts/", "platform": "", "project_url": "https://pypi.org/project/dts/", "project_urls": { "Homepage": "https://github.com/KwangYeol/dts" }, "release_url": "https://pypi.org/project/dts/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Generate sequence of datatimes, like seq", "version": "0.1.3" }, "last_serial": 3858543, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "b058e6d72144b02ffa803aa6037afed3", "sha256": "a763dc439e887961b8817ce2f2626ebc36b949d0a1d54ca251905cb6a6ea3657" }, "downloads": -1, "filename": "dts-0.1.1-py2.7.egg", "has_sig": false, "md5_digest": "b058e6d72144b02ffa803aa6037afed3", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6696, "upload_time": "2018-05-11T06:41:10", "url": "https://files.pythonhosted.org/packages/f0/a9/6f5c0f91589e013830f702942ae81f4ce895c5d8b47e38962c1ccd7158b1/dts-0.1.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "cbf4cdac54b945a9409c59aedb839d11", "sha256": "c522f9d13206f835607e599b61b50141459fd011116b2f2f833cedba8e7c02a8" }, "downloads": -1, "filename": "dts-0.1.1-py3.6.egg", "has_sig": false, "md5_digest": "cbf4cdac54b945a9409c59aedb839d11", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 6766, "upload_time": "2018-05-11T06:41:10", "url": "https://files.pythonhosted.org/packages/6d/64/84485de35573a7460a29f73342d08915d6e22b216c89b7e7d5a09833ff07/dts-0.1.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "f8670023955b82c204376a1414375957", "sha256": "9e6cb80f4f49237cd6f8348c7cd51b3636569f98ef23864ae4ff2e65bb8cf75d" }, "downloads": -1, "filename": "dts-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f8670023955b82c204376a1414375957", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2863, "upload_time": "2018-05-11T05:39:47", "url": "https://files.pythonhosted.org/packages/81/c5/140ed89ee8b855134b6a26d899dec3ab8d9fc1d37b3f23e9ff80ec728c7e/dts-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "06eee86588a4e8f9f54792585e340b89", "sha256": "36aca8c87653d675b7f65557723dd6aca6232fe000e540249c64292f117a2a20" }, "downloads": -1, "filename": "dts-0.1.2.tar.gz", "has_sig": false, "md5_digest": "06eee86588a4e8f9f54792585e340b89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3665, "upload_time": "2018-05-11T06:42:12", "url": "https://files.pythonhosted.org/packages/cc/98/6c50ae5c4122b79d0eef67b0d67f7594fa37c1527988cadeb16a4cfdb873/dts-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "842db8a89b355271cd225666fd095552", "sha256": "51968dc946d2e60241faca615c14dccb550d2e23e44ed0496293254597e0b778" }, "downloads": -1, "filename": "dts-0.1.3.tar.gz", "has_sig": false, "md5_digest": "842db8a89b355271cd225666fd095552", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5948, "upload_time": "2018-05-13T13:48:52", "url": "https://files.pythonhosted.org/packages/93/3e/bb28ee0dc1b1b713934d5bc2a3a858de930277ee0e1f631f38ee809e58b8/dts-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "842db8a89b355271cd225666fd095552", "sha256": "51968dc946d2e60241faca615c14dccb550d2e23e44ed0496293254597e0b778" }, "downloads": -1, "filename": "dts-0.1.3.tar.gz", "has_sig": false, "md5_digest": "842db8a89b355271cd225666fd095552", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5948, "upload_time": "2018-05-13T13:48:52", "url": "https://files.pythonhosted.org/packages/93/3e/bb28ee0dc1b1b713934d5bc2a3a858de930277ee0e1f631f38ee809e58b8/dts-0.1.3.tar.gz" } ] }