{ "info": { "author": "Lucas Epp", "author_email": "lucas@pagerduty.com", "bugtrack_url": null, "classifiers": [], "description": "ScheduleDuty\n============\n\nImport schedules from a CSV file. Currently supports weekly shift-based\nschedules and standard rotation-based schedules.\n\nUsage\n-----\n\n1. Create a CSV file with the following format depending upon your schedule\ntype:\n\n Weekly Shifts::\n\n escalation_level,user_or_team,type,day_of_week,start_time,end_time\n\n **escalation\\_level** (int): Level to place user/team on the\n escalation policy\n\n **user\\_or\\_team** (str): The name/email of the user/team\n\n **type** (str): Must be one of user, team\n\n **day\\_of\\_week** (str or int): Must be one of 0, 1, 2, 3, 4, 5, 6,\n sunday, monday, tuesday, wednesday, thursday, friday, saturday,\n weekday, weekdays, weekend, weekends, all\n\n **start\\_time** (str): Start time of the shift for that day\n (i.e. 13:00)\n\n **end\\_time** (str): End time of the shift for that day (i.e. 21:00)\n\n Standard Rotation::\n\n user,layer,layer_name,rotation_type,shift_length,shift_type,handoff_day,handoff_time,restriction_start_day,restriction_start_time,restriction_end_date,restriction_end_time\n\n **user** (str): The name/email of the user\n\n **layer** (int): The schedule layer\n\n **layer_name** (str): The name of the layer\n\n **rotation_type** (str): The type of rotation. Can be one of daily, weekly,\n custom.\n\n **shift_length** (int): Length of the on-call shift in a ``custom`` rotation\n\n **shift_type** (str): The unit of measure for the ``shift_length``. Can be\n one of hours, days, weeks.\n\n **handoff_day** (str or int): The day of the week to handoff the on-call\n shift. Can be one of 0, 1, 2, 3, 4, 5, 6, monday, tuesday, wednesday,\n thursday, friday, saturday, sunday\n\n **handoff_time** (str):The time of day to handoff the shift (i.e. 08:00)\n\n **restriction_start_day** (str): Day of the week to start the restriction.\n Can be one of 0, 1, 2, 3, 4, 5, 6, monday, tuesday, wednesday, thursday,\n friday, saturday, sunday\n\n **restriction_start_time** (str): Time of day to start the restriction\n (i.e. 08:00)\n\n **restriction_end_date** (str): Day of the week to end the restriction. Can\n be one of 0, 1, 2, 3, 4, 5, 6, monday, tuesday, wednesday, thursday, friday,\n saturday, sunday\n\n **restriction_end_time** (str): Time of day to end the restriction\n (i.e. 17:00)\n\n\\2. Save all CSV files into one directory\n\n3. If running from the command line, execute the ``import_schedules.py`` script with the command line arguments for\nyour schedule type:\n\n Weekly Shifts::\n\n ./scheduleduty/scheduleduty.py --schedule-type weekly_shifts --csv-dir examples/weekly_shifts --api-key EXAMPLE_TOKEN --base-name \"Weekly Shifts\" --level-name Level --multiple-name Multi --start-date 2017-01-01 --end-date 2017-02-01 --time-zone UTC --num-loops 1 --escalation-delay 30\n\n Standard Rotation::\n\n ./scheduleduty/scheduleduty.py --schedule-type standard_rotation --csv-dir examples/standard_rotation --api-key EXAMPLE_TOKEN --base-name \"Standard Rotation\" --start-date 2017-01-01 --end-date 2017-02-01 --time-zone UTC\n\n\\4. If importing into a script, use the ``execute`` function within the ``Import`` class to import your schedules:\n\n Weekly Shifts::\n\n from scheduleduty import scheduleduty\n importer = scheduleduty.Import(\"weekly_shifts\",\"./examples/weekly_shifts\",\"EXAMPLE_TOKEN\",\"Weekly Shifts\",\"Level\",\"Multi\",\"2017-01-01\",\"2017-02-01\",\"UTC\",1,30)\n importer.execute()\n\n Standard Rotation::\n\n from scheduleduty import scheduleduty\n importer = scheduleduty.Import(\"standard_rotation\",\"./examples/standard_rotation\",\"EXAMPLE_TOKEN\",\"Standard Rotation\",None,None,\"2017-01-01\",\"2017-02-01\",\"UTC\",None,None)\n importer.execute()\n\nArguments\n----------------------\n\n``--schedule-type``: Type of schedule(s) being uploaded. Must be one of ``weekly_shifts``, ``standard_rotation``.\n\n``--csv-dir``: Path to the directory housing all CSVs to import into PagerDuty. Required for all schedule types.\n\n``--api-key``: PagerDuty v2 REST API token. Required for all schedule types.\n\n``--base-name``: Name of the escalation policy or schedule being added as well as the base name for each schedule added to the escalation policy. Required for all schedule types.\n\n``--level-name``: The base name for each new escalation policy level to be appended by the integer value of the level number. Required for ``weekly_shifts`` schedule type.\n\n``--multiple-name``: The base name for each schedule on the same escalation policy level to be appended by the integer value of the schedule number. Required for ``weekly_shifts`` schedule type.\n\n``--start-date``: ISO 8601 formatted start date for the schedule. Currently only support dates in YYYY-MM-DD format. Required for all schedule types.\n\n``--end-date``: ISO 8601 formatted end date for the schedule. Currently only supports dates in YYYY-MM-DD format. Optional for all schedule types.\n\n``--time-zone``: Time zone for this schedule. Must be one of the time zones from the IANA time zone database. Required for all schedule types.\n\n``--num-loops``: The number of times to loop through the escalation policy. Required for ``weekly_shifts`` schedule type.\n\n``--escalation-delay``: The number of minutes to wait before escalating the incident to the next level. Required for ``weekly_shifts`` schedule type.\n\nTesting\n-------\n\n1. Create a file ``config.json`` that includes your command-line\n arguments for testing:\n\n ::\n\n {\n \"api_key\": \"EXAMPLE_KEY\",\n \"base_name\": \"Weekly Shifts\",\n \"level_name\": \"Level\",\n \"multi_name\": \"Multi\",\n \"start_date\": \"2017-01-01\",\n \"end_date\": null,\n \"time_zone\": \"UTC\",\n \"num_loops\": 1,\n \"escalation_delay\": 30\n }\n\n2. Save ``config.json`` within the ``tests`` directory\n\n3. Run the test suite in ``test_suite.py``:\n\n ::\n\n python tests/test_suite.py\n\nAuthor\n------\n\nLuke Epp lucas@pagerduty.com\n\n.. _IANA time zone database: https://www.iana.org/time-zones", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lfepp/scheduleduty", "keywords": "pagerduty pd schedule schedules", "license": "Copyright (c) 2016, PagerDuty, Inc. \nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n * Neither the name of PagerDuty Inc nor the\n names of its contributors may be used to endorse or promote products\n derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL PAGERDUTY INC BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": null, "maintainer_email": null, "name": "scheduleduty", "package_url": "https://pypi.org/project/scheduleduty/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/scheduleduty/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/lfepp/scheduleduty" }, "release_url": "https://pypi.org/project/scheduleduty/0.3.3/", "requires_dist": null, "requires_python": null, "summary": "Tool to import schedules saved as CSV files into PagerDuty", "version": "0.3.3" }, "last_serial": 2531234, "releases": { "0.2.3": [ { "comment_text": "", "digests": { "md5": "7633658617344e5e2496a86669430fec", "sha256": "5cc8e96297c02b44c3420f1f8ce18f469ebf79b1084ba0ce603ca7b806784c7f" }, "downloads": -1, "filename": "scheduleduty-0.2.3.tar.gz", "has_sig": false, "md5_digest": "7633658617344e5e2496a86669430fec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14948, "upload_time": "2016-09-01T22:52:36", "url": "https://files.pythonhosted.org/packages/ab/75/61c53ec08f6b1d54a56195cda26b76b39eabecacf86d9948acd8c0a5eb50/scheduleduty-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "91d15ca36df9077f99106f7b404e9efc", "sha256": "c78480551eb946c2d66dbcd7d1ead8b21c1343f840ff58316d524df5e0b00f7a" }, "downloads": -1, "filename": "scheduleduty-0.3.0.tar.gz", "has_sig": false, "md5_digest": "91d15ca36df9077f99106f7b404e9efc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15486, "upload_time": "2016-09-08T21:13:06", "url": "https://files.pythonhosted.org/packages/77/06/7afa1f0a841703cd3524c34cce5f1689df500d85257f1d46f65f06262eea/scheduleduty-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "929d9f9932a168b6352c27ae2ef97483", "sha256": "803c1dd8e9da41b958f95289ad1c6e54669064373d0712ff5b719ca19c0da80d" }, "downloads": -1, "filename": "scheduleduty-0.3.1.tar.gz", "has_sig": false, "md5_digest": "929d9f9932a168b6352c27ae2ef97483", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15479, "upload_time": "2016-09-28T17:46:32", "url": "https://files.pythonhosted.org/packages/b9/04/28ee6a6bdee8a6af089fc49d42f58569d18afe65b57cfe8daf53a0cea32f/scheduleduty-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "cdc4ce7c19aa7221549cc7feef983472", "sha256": "f5f57e84b84dc5ae2df022f104bab0b22af7114f8f3b50f54fc6cd57e8982792" }, "downloads": -1, "filename": "scheduleduty-0.3.2.tar.gz", "has_sig": false, "md5_digest": "cdc4ce7c19aa7221549cc7feef983472", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15641, "upload_time": "2016-12-20T20:11:56", "url": "https://files.pythonhosted.org/packages/e1/47/2c14ae6ad9f2cefbea4a22151db8e6ec64a210865a0b20064e4314fc031a/scheduleduty-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "5181dd02bd35ace3336b57e8008245f2", "sha256": "f535f00102fcf93f7a4d3535be2f76fa80b6eeac2b0bad0ed2c0fab5520b696d" }, "downloads": -1, "filename": "scheduleduty-0.3.3.tar.gz", "has_sig": false, "md5_digest": "5181dd02bd35ace3336b57e8008245f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15571, "upload_time": "2016-12-20T21:11:39", "url": "https://files.pythonhosted.org/packages/34/61/8825bfa4c1ef555fdff517eef362492db8b834d3d43e3513bd230a851b5b/scheduleduty-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5181dd02bd35ace3336b57e8008245f2", "sha256": "f535f00102fcf93f7a4d3535be2f76fa80b6eeac2b0bad0ed2c0fab5520b696d" }, "downloads": -1, "filename": "scheduleduty-0.3.3.tar.gz", "has_sig": false, "md5_digest": "5181dd02bd35ace3336b57e8008245f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15571, "upload_time": "2016-12-20T21:11:39", "url": "https://files.pythonhosted.org/packages/34/61/8825bfa4c1ef555fdff517eef362492db8b834d3d43e3513bd230a851b5b/scheduleduty-0.3.3.tar.gz" } ] }