{ "info": { "author": "Maxim Mamaev", "author_email": "mmamaev2@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Office/Business :: Scheduling" ], "description": "\n\nExamples of problems solved by timeboard: \n\n - If we have 20 business days to complete the project when will be the deadline? \n\n - If a person was employed from November 15 to December 22 and salary is paid monthly, how many month's salaries has the employee earned?\n\n - The above-mentioned person was scheduled to work Mondays, Tuesdays, Saturdays, and Sundays on odd weeks, and Wednesdays, Thursdays, and Fridays on even weeks. The question is the same.\n\n - A 24x7 call center operates in shifts of varying length starting at 02:00, 08:00, and 18:00. An operator comes in on every fourth shift and is paid per shift. How many shifts has the operator sat in a specific month?\n\n - With employees entering and leaving a company throughout a year, what was the average annual headcount?\n\nBased on pandas timeseries library, timeboard gives more flexibility than pandas's built-in business calendars. The key features of timeboard are:\n\n- You can choose any time frequencies (days, hours, multiple-hour shifts, etc.) as work periods.\n\n- You can create sophisticated schedules which can combine periodical patterns, seasonal variations, stop-and-resume behavior, etc.\n\n- There are built-in standard business day calendars (in this version: for USA, UK, and Russia).\n\n\nInstallation\n============\n\n\n\n pip install timeboard\n\ntimeboard is tested with Python versions 2.7 and 3.6.\n\nDependencies:\n\n- pandas >= 0.22\n- numpy >= 1.13\n- dateutil >= 2.6.1\n- six >= 1.11\n\nThe import statement to run all the examples:\n\n\n >>> import timeboard as tb\n\n\nQuick Start Guide\n=================\n\nSet up a timeboard\n------------------\n\nTo get started you need to build a timeboard (calendar). The simplest way to do so is to use a preconfigured calendar which is shipped with the package. Let's take a regular business day calendar for the United States. \n\n\n >>> import timeboard.calendars.US as US\n >>> clnd = US.Weekly8x5()\n\n\n.. note If you need to build a custom calendar, for example, a schedule of shifts for a 24x7 call center, Making a Timeboard _ section of the documentation explains this topic in details. \n\nOnce you have got a timeboard, you may perform queries and calculations over it.\n\nPlay with workshifts\n--------------------\n\nCalling a timeboard instance clnd with a single point in time produces an object representing a unit of the calendar (in this case, a day) that contains this point in time. Object of this type is called *workshift*.\n\nIs a certain date a business day? \n\n\n >>> ws = clnd('27 May 2017')\n >>> ws.is_on_duty()\n False\n\nIndeed, it was a Saturday. \n\n\nWhen was the next business day? \n\n\n >>> ws.rollforward()\n Workshift(6359) of 'D' at 2017-05-30\n\nThe returned calendar unit (workshift) has the sequence number of 6359 and represents the day of 30 May 2017, which, by the way, was the Tuesday after the Memorial Day holiday.\n\n\nIf we were to finish the project in 22 business days starting on 01 May 2017, when would be our deadline? \n\n\n >>> clnd('01 May 2017') + 22\n Workshift(6361) of 'D' at 2017-06-01\n\nThis is the same as:\n\n\n >>> clnd('01 May 2017').rollforward(22)\n Workshift(6361) of 'D' at 2017-06-01\n\n\nPlay with intervals\n-------------------\n\nCalling clnd() with a different set of parameters produces an object representing an *interval* on the calendar. The interval below contains all workshifts of the months of May 2017.\n\nHow many business days were there in a certain month? \n\n\n >>> may2017 = clnd('May 2017', period='M')\n >>> may2017.count()\n 22\n\n\nHow many days off? \n\n\n >>> may2017.count(duty='off')\n 9\n\n\nHow many working hours?\n\n\n >>> may2017.worktime()\n 176.0\n\n\nAn employee was on the staff from April 3, 2017 to May 15, 2017. What portion of April's salary did the company owe them? \n\nCalling clnd() with a tuple of two points in time produces an interval containing all workshifts between these points, inclusively.\n\n\n >>> time_in_company = clnd(('03 Apr 2017','15 May 2017'))\n >>> time_in_company.what_portion_of(clnd('Apr 2017', period='M'))\n 1.0\n\nIndeed, the 1st and the 2nd of April in 2017 fell on the weekend, therefore, having started on the 3rd, the employee checked out all the working days in the month.\n\nAnd what portion of May's? \n\n\n >>> time_in_company.what_portion_of(may2017)\n 0.5\n\nHow many days had the employee worked in May?\n\nThe multiplication operator returns the intersection of two intervals.\n\n\n >>> (time_in_company * may2017).count()\n 11\n\nHow many hours?\n\n\n >>> (time_in_company * may2017).worktime()\n 88\n\n\nAn employee was on the staff from 01 Jan 2016 to 15 Jul 2017. How many years this person had worked for the company?\n\n\n >>> clnd(('01 Jan 2016', '15 Jul 2017')).count_periods('A')\n 1.5421686746987953\n\n\nLinks\n=====\n\nDocumentation: https://timeboard.readthedocs.io/\n\nGitHub: https://github.com/mmamaev/timeboard\n\nPyPI: https://pypi.python.org/pypi/timeboard\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://timeboard.readthedocs.io", "keywords": "business day calendar schedule calculation shift", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "timeboard", "package_url": "https://pypi.org/project/timeboard/", "platform": "", "project_url": "https://pypi.org/project/timeboard/", "project_urls": { "Homepage": "http://timeboard.readthedocs.io" }, "release_url": "https://pypi.org/project/timeboard/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "Calendar calculations over business days and work shifts", "version": "0.2.2" }, "last_serial": 5213390, "releases": { "0.0": [ { "comment_text": "", "digests": { "md5": "075fd770dff6614b73a531bfc1b8080c", "sha256": "5aba47e399a6aa590ada98135038e941c9ce50cc5fb56b90d8efc642e3d05abf" }, "downloads": -1, "filename": "timeboard-0.0.tar.gz", "has_sig": false, "md5_digest": "075fd770dff6614b73a531bfc1b8080c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 290393, "upload_time": "2018-01-31T15:36:06", "url": "https://files.pythonhosted.org/packages/b9/d0/567289b813b4124a93ccbbea61744a790bd71fe57fa31f717405d1f0599b/timeboard-0.0.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "c47cc9b41771675be30893a6b20f1ada", "sha256": "8e6a4ec598ac68f5c80f405eb783e00a9378319ecc1dc7b648e506eadb4770f4" }, "downloads": -1, "filename": "timeboard-0.1.tar.gz", "has_sig": false, "md5_digest": "c47cc9b41771675be30893a6b20f1ada", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 296708, "upload_time": "2018-02-05T17:25:28", "url": "https://files.pythonhosted.org/packages/9a/35/d248a9cc7b678dff71a85c3d83a76f2e4dc06a3719f60ac6d7ed55e17600/timeboard-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7c3abc32b7f50379d738ee5e997c9e1b", "sha256": "24764910a6463eee7c8f12cf35d9cd68bb86871807f75d8aa17b0bbfcde01165" }, "downloads": -1, "filename": "timeboard-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7c3abc32b7f50379d738ee5e997c9e1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 320906, "upload_time": "2018-03-01T09:04:05", "url": "https://files.pythonhosted.org/packages/b5/d9/9797e3662191651edc0a2deabad8f241eed24c4aab4a9b51c1c12aff83d6/timeboard-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e1b08a94fbe23fab7a6a0b3289c0d82d", "sha256": "27c52378da205e62ebbaaf9e61aa1221edadd6b7b999426d47e28b2510d45a9a" }, "downloads": -1, "filename": "timeboard-0.1.2.tar.gz", "has_sig": false, "md5_digest": "e1b08a94fbe23fab7a6a0b3289c0d82d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 321118, "upload_time": "2018-03-01T14:22:00", "url": "https://files.pythonhosted.org/packages/69/f0/1de1925b855160e681b1de3d667e930074370cef0e36d1d16f0b9f61a2da/timeboard-0.1.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a4cbc826b6eb43f3dc93653f165902be", "sha256": "5f6577e075b59733cd5d68ab125dc9d42ecc5d151024fb6218e0a86bf9d8dada" }, "downloads": -1, "filename": "timeboard-0.2.tar.gz", "has_sig": false, "md5_digest": "a4cbc826b6eb43f3dc93653f165902be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 321096, "upload_time": "2018-03-01T16:11:31", "url": "https://files.pythonhosted.org/packages/78/41/7e1c1dc70b557d3a4a25a38a2d9016c6b9fc030b019925cf2ccd8b857647/timeboard-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "8bc646db15f70dc88d3de0943c6c4915", "sha256": "eb3af06ffdc78b852d0e067e15ebbc867c1922ee30be16cf1d3842ff4cc62d3a" }, "downloads": -1, "filename": "timeboard-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8bc646db15f70dc88d3de0943c6c4915", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 321503, "upload_time": "2019-01-15T14:18:38", "url": "https://files.pythonhosted.org/packages/7b/bd/712191aad4f4f07f013a408909629204f757bf634e4dc7bded78ba8c5d7e/timeboard-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "4b9546acfdb81f176bce9a381912675a", "sha256": "ad7e6859db3ee93612c4bb1553505f259a1691449ace0164be5c481bb780b9bd" }, "downloads": -1, "filename": "timeboard-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4b9546acfdb81f176bce9a381912675a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 321786, "upload_time": "2019-05-01T17:16:39", "url": "https://files.pythonhosted.org/packages/83/5c/b58a6976881abc63f35649fb5a68e8cbeb5d1fa1bb602a0b430c8c6ca5cd/timeboard-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4b9546acfdb81f176bce9a381912675a", "sha256": "ad7e6859db3ee93612c4bb1553505f259a1691449ace0164be5c481bb780b9bd" }, "downloads": -1, "filename": "timeboard-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4b9546acfdb81f176bce9a381912675a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 321786, "upload_time": "2019-05-01T17:16:39", "url": "https://files.pythonhosted.org/packages/83/5c/b58a6976881abc63f35649fb5a68e8cbeb5d1fa1bb602a0b430c8c6ca5cd/timeboard-0.2.2.tar.gz" } ] }