{ "info": { "author": "Nicco Kunzmann", "author_email": "niccokunzmann@rambler.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "Recurring ICal events for Python\n================================\n\n.. image:: https://travis-ci.org/niccokunzmann/python-recurring-ical-events.svg?branch=master\n :target: https://travis-ci.org/niccokunzmann/python-recurring-ical-events\n :alt: Travis Build and Tests Status\n\n.. image:: https://badge.fury.io/py/recurring-ical-events.svg\n :target: https://pypi.python.org/pypi/recurring-ical-events\n :alt: Python Package Version on Pypi\n\n.. image:: https://img.shields.io/pypi/dm/recurring-ical-events.svg\n :target: https://pypi.python.org/pypi/recurring-ical-events#downloads\n :alt: Downloads from Pypi\n\n\nICal has some complexity to it:\nEvents can be repeated, removed from the feed and edited later on.\nThis tool takes care of these circumstances.\n\nLet's put our expertise together and build a tool that can solve this!\n\n* day light saving time (DONE)\n* recurring events (DONE)\n* recurring events with edits (DONE)\n* recurring events where events are omitted (DONE)\n* recurring events events where the edit took place later (DONE)\n* normal events (DONE)\n* recurrence of dates but not hours, minutes, and smaller (DONE)\n* endless recurrence (DONE)\n* ending recurrence (DONE)\n* events with start date and no end date (DONE)\n* events with start as date and start as datetime (DONE)\n* `RRULE `_ (DONE)\n* `RDATE `_ (DONE)\n* `DURATION `_ (DONE)\n* `EXDATE `_ (DONE)\n\nNot included:\n\n* EXRULE (deprecated), see `8.3.2. Properties Registry\n `_\n\n\nInstallation\n------------\n\n.. code:: shell\n\n pip install recurring-ical-events\n\nExample\n-------\n\n.. code-block:: python\n\n import icalendar\n import recurring_ical_events\n import urllib.request\n\n start_date = (2019, 3, 5)\n end_date = (2019, 4, 1)\n url = \"http://tinyurl.com/y24m3r8f\"\n\n ical_string = urllib.request.urlopen(url).read()\n calendar = icalendar.Calendar.from_ical(ical_string)\n events = recurring_ical_events.of(calendar).between(start_date, end_date)\n for event in events:\n start = event[\"DTSTART\"].dt\n duration = event[\"DTEND\"].dt - event[\"DTSTART\"].dt\n print(\"start {} duration {}\".format(start, duration))\n\nOutput:\n\n.. code-block:: text\n\n start 2019-03-18 04:00:00+01:00 duration 1:00:00\n start 2019-03-20 04:00:00+01:00 duration 1:00:00\n start 2019-03-19 04:00:00+01:00 duration 1:00:00\n start 2019-03-07 02:00:00+01:00 duration 1:00:00\n start 2019-03-08 01:00:00+01:00 duration 2:00:00\n start 2019-03-09 03:00:00+01:00 duration 0:30:00\n start 2019-03-10 duration 1 day, 0:00:00\n\n\nUsage\n-----\n\nThe `icalendar `_ module is responsible for parsing and converting calendars.\nThe `recurring_ical_events `_ module uses such a calendar and creates all repetitions of its events within a time span.\n\nTo import this module, write \n\n.. code:: Python\n\n import recurring_ical_events\n\nThere are several methods you can use to unfold repeating events, such as ``at(a_time)`` and ``between(a_start, an_end)``.\n\n``at(a_date)``\n**************\n\nYou can get all events which take place at ``a_date``.\nA date can be a year, e.g. ``2023``, a month of a year e.g. January in 2023 ``(2023, 1)``, a day of a certain month e.g. ``(2023, 1, 1)``, an hour e.g. ``(2023, 1, 1, 0)``, a minute e.g. ``(2023, 1, 1, 0, 0)``, or second as well as a `datetime.date `_ object and `datetime.datetime `_.\n\nThe start and end are inclusive. As an example: if an event is longer than one day it is still included if it takes place at ``a_date``.\n\n.. code:: Python\n\n a_date = 2023 # a year\n a_date = (2023, 1) # January in 2023\n a_date = (2023, 1, 1) # the 1st of January in 2023\n a_date = (2023, 1, 1, 0) # the first hour of the year 2023\n a_date = (2023, 1, 1, 0, 0) # the first minute in 2023\n a_date = datetime.date(2023) # the first day in 2023\n a_date = datetime.date(2023, 1, 1) # the first day in 2023\n \n events = recurring_ical_events.of(an_icalendar_object).at(a_date)\n\nThe resulting ``events`` are a list of icalendar events, see below.\n\n``between(start, end)``\n***********************\n\n``between(start, end)`` returns all events happening between a start and an end time. Both arguments can be `datetime.datetime`_, `datetime.date`_, tuples of numbers passed as arguments to `datetime.datetime`_ or strings in the form of\n``%Y%m%d`` (``yyyymmdd``) and ``%Y%m%dT%H%M%SZ`` (``yyyymmddThhmmssZ``).\nFor examples, see ``at(a_date)`` above.\n\n.. code:: Python\n\n events = recurring_ical_events.of(an_icalendar_object).between(start, end)\n\nThe resulting ``events`` are in a list, see below.\n\n``events`` as list\n******************\n\nThe result of both ``between(start, end)`` and ``at(a_date)`` is a list of `icalendar`_ events.\nBy default, all attributes of the event with repetitions are copied, like UID and SUMMARY.\nHowever, these attributes may differ from the source event:\n\n* DTSTART which is the start of the event instance.\n* DTEND which is the end of the event instance.\n* RDATE, EXDATE, RRULE are the rules to create event repetitions. If they are included is undefined. Future requirements may remove them. If you like to have them included, please write a test or `open an issue `_.\n\nDevelopment\n-----------\n\n1. Optional: Install virtualenv and Python3 and create a virtual environment.\n .. code-block:: shell\n\n virtualenv -p python3 ENV\n source ENV/bin/activate\n2. Install the packages.\n .. code-block:: shell\n\n pip install -r requirements.txt -r test-requirements.txt\n3. Run the tests\n .. code-block:: shell\n\n pytest\n\nTo release new versions, edit setup.py, the ``__version__`` variable and run\n\n.. code-block:: shell\n\n python3 setup.py tag_and_deploy\n\nTesting\n*******\n\nThis project's development is driven by tests.\nYou can view the tests in the `test folder\n`_\nIf you have a calendar ICS file for which this library does not\ngenerate the desired output, you can add it to the ``test/calendars``\nfolder and write tests for what you expect.\nIf you like, `open an issue`_ first, e.g. to discuss the changes and\nhow to go about it.\n\nRelated Projects\n----------------\n\n- `icalevents `_ - another library for roughly the same use-case\n- `icalendar`_ - the library used to parse ICS files\n- `Open Web Calendar `_ - a web calendar to embed into websites which uses this library\n\nResearch\n--------\n\n- `RFC 5545 `_\n- `Stackoverflow question this is created for `_\n- ``_\n - ``_\n- ``_\n- ``_\n- ``_\n- RDATE ``_\n - ``_", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/niccokunzmann/python-recurring-ical-events", "keywords": "icalendar", "license": "LGPLv3+", "maintainer": "", "maintainer_email": "", "name": "recurring-ical-events", "package_url": "https://pypi.org/project/recurring-ical-events/", "platform": "", "project_url": "https://pypi.org/project/recurring-ical-events/", "project_urls": { "Homepage": "https://github.com/niccokunzmann/python-recurring-ical-events" }, "release_url": "https://pypi.org/project/recurring-ical-events/0.1.12b0/", "requires_dist": null, "requires_python": "", "summary": "A Python module which repeats ICalendar events by RRULE, RDATE and EXDATE.", "version": "0.1.12b0" }, "last_serial": 5972172, "releases": { "0.0.2a0": [ { "comment_text": "", "digests": { "md5": "7813078ee33c748807eee2043b977ed4", "sha256": "ca8956fe56132b7a236c074dce7a87da5d92e488e639a65e630edb811579308b" }, "downloads": -1, "filename": "recurring_ical_events-0.0.2a0.tar.gz", "has_sig": false, "md5_digest": "7813078ee33c748807eee2043b977ed4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11896, "upload_time": "2019-03-03T17:16:34", "url": "https://files.pythonhosted.org/packages/8b/32/204e877fc0fa451033f410ea8c50234e6504858fb684c4c63e49244b0f9d/recurring_ical_events-0.0.2a0.tar.gz" } ], "0.0.4a0": [ { "comment_text": "", "digests": { "md5": "518fd6e2ccf9e17ac00dfc1ffd9b2267", "sha256": "96993f27ea68414faee0f03149a5fcd9ebe8735138f977838e782a2092e5877b" }, "downloads": -1, "filename": "recurring_ical_events-0.0.4a0.tar.gz", "has_sig": false, "md5_digest": "518fd6e2ccf9e17ac00dfc1ffd9b2267", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12120, "upload_time": "2019-03-03T18:50:26", "url": "https://files.pythonhosted.org/packages/5f/32/154da9b47b5f4bf7a93e1802b82d5ebebce37710e3b9346da2ad00316116/recurring_ical_events-0.0.4a0.tar.gz" } ], "0.0.5a0": [ { "comment_text": "", "digests": { "md5": "cb233b78c25ccc78458382996fea0fbd", "sha256": "a2c573bc517d86df2088bd433ad35893b02562d45ec3c6793e5d8ced2d977c1c" }, "downloads": -1, "filename": "recurring_ical_events-0.0.5a0.tar.gz", "has_sig": false, "md5_digest": "cb233b78c25ccc78458382996fea0fbd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12393, "upload_time": "2019-03-03T19:26:49", "url": "https://files.pythonhosted.org/packages/a0/3e/f1cce01215003a5d5ac97f4e0304e4504d3518b85370b18ac72792810906/recurring_ical_events-0.0.5a0.tar.gz" } ], "0.0.6a0": [ { "comment_text": "", "digests": { "md5": "2bac7b793472b499f0d10d9abafecfa2", "sha256": "5233f246f6dc750019775740655f83aaf7038051e584737bd867935459d6824b" }, "downloads": -1, "filename": "recurring_ical_events-0.0.6a0.tar.gz", "has_sig": false, "md5_digest": "2bac7b793472b499f0d10d9abafecfa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13290, "upload_time": "2019-03-04T13:47:29", "url": "https://files.pythonhosted.org/packages/0e/cc/8ed296952dc87d6393406daf24a92ecf098184ea001249ee339b9bf54589/recurring_ical_events-0.0.6a0.tar.gz" } ], "0.0.7a0": [ { "comment_text": "", "digests": { "md5": "57b02d2af7b3f4e6fd25add2082d45df", "sha256": "6f5b506b06818f329296844bbf814f61ac4e4fbdd47e0684ecfc773c54da608e" }, "downloads": -1, "filename": "recurring_ical_events-0.0.7a0.tar.gz", "has_sig": false, "md5_digest": "57b02d2af7b3f4e6fd25add2082d45df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13711, "upload_time": "2019-03-04T16:56:45", "url": "https://files.pythonhosted.org/packages/8f/2a/793a1f63f51b2b04e9a76553838907ab0acd27397a077c21b82d2e622c0b/recurring_ical_events-0.0.7a0.tar.gz" } ], "0.0.8a0": [ { "comment_text": "", "digests": { "md5": "3736e5bd8e9d1dd7318fb06b3be2d72d", "sha256": "d90c4d33a6d000f683a581f337e1ba0e8909a436950c4ed649d2bac775cd5d4a" }, "downloads": -1, "filename": "recurring_ical_events-0.0.8a0.tar.gz", "has_sig": false, "md5_digest": "3736e5bd8e9d1dd7318fb06b3be2d72d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13905, "upload_time": "2019-03-04T17:16:22", "url": "https://files.pythonhosted.org/packages/cd/e8/d04d33ad0189d0b1dd9f91761ed59236c3758dec16d4001971b258d7196c/recurring_ical_events-0.0.8a0.tar.gz" } ], "0.1.10b0": [ { "comment_text": "", "digests": { "md5": "ae25f3c8793775b087c741a55a72a42e", "sha256": "4e905b7d27a4fdb22a42c2ddc7fce044f8f0c2dc51b565cc4a2a24b3f8bbf372" }, "downloads": -1, "filename": "recurring_ical_events-0.1.10b0.tar.gz", "has_sig": false, "md5_digest": "ae25f3c8793775b087c741a55a72a42e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23052, "upload_time": "2019-10-04T20:21:30", "url": "https://files.pythonhosted.org/packages/ee/11/de4487500fa4c85f8f00d2834f8c5e2b60be0f9c9bfb02b559b888f4adfd/recurring_ical_events-0.1.10b0.tar.gz" } ], "0.1.11b0": [ { "comment_text": "", "digests": { "md5": "fa0186684cc2d62dae574e70ea1033d8", "sha256": "1526216d587cd1c29897231b9e12b52ec0f5d8eb769baf8037a81b33e81aa5cf" }, "downloads": -1, "filename": "recurring_ical_events-0.1.11b0.tar.gz", "has_sig": false, "md5_digest": "fa0186684cc2d62dae574e70ea1033d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23265, "upload_time": "2019-10-13T22:59:47", "url": "https://files.pythonhosted.org/packages/a9/2b/a7229310ca8b7c0eea829f608f6eb7d11a0106f6f82bc23d40ed6d1129e8/recurring_ical_events-0.1.11b0.tar.gz" } ], "0.1.12b0": [ { "comment_text": "", "digests": { "md5": "b56cef1efe87243c7779380ef11b31d2", "sha256": "f8035226fc1ab6d2d60230b81689ee77221ddd92d46eaf4b66f8bb7ea893ba21" }, "downloads": -1, "filename": "recurring_ical_events-0.1.12b0.tar.gz", "has_sig": false, "md5_digest": "b56cef1efe87243c7779380ef11b31d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23603, "upload_time": "2019-10-14T15:54:52", "url": "https://files.pythonhosted.org/packages/f3/60/85cadf52901b86cf0d1a198cc8f5de3f2428586841f066af314c8e70c1d3/recurring_ical_events-0.1.12b0.tar.gz" } ], "0.1.1a0": [ { "comment_text": "", "digests": { "md5": "7b2f6bb5ae6cc5508fcff683d811b987", "sha256": "6ba7169e48d7a3be9b333067427e77f442908049a9c84ebcabd9bc8cbfab74d7" }, "downloads": -1, "filename": "recurring_ical_events-0.1.1a0.tar.gz", "has_sig": false, "md5_digest": "7b2f6bb5ae6cc5508fcff683d811b987", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14104, "upload_time": "2019-03-04T18:25:12", "url": "https://files.pythonhosted.org/packages/43/f9/382b22af6a8308047519607a54837bbcf2f6826c487d251f632221e0be84/recurring_ical_events-0.1.1a0.tar.gz" } ], "0.1.2a0": [ { "comment_text": "", "digests": { "md5": "06d438761ad09b6677eb9e9f945a2bc5", "sha256": "9df4df7be01598e876dc352de240dfcf20cebfc5f16401585362f00e5ff052ef" }, "downloads": -1, "filename": "recurring_ical_events-0.1.2a0.tar.gz", "has_sig": false, "md5_digest": "06d438761ad09b6677eb9e9f945a2bc5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14788, "upload_time": "2019-03-06T12:44:09", "url": "https://files.pythonhosted.org/packages/3f/ad/7ee12d94dcc880b9f3be67e2d564f15a48e4d96133c8be3469d1da75272c/recurring_ical_events-0.1.2a0.tar.gz" } ], "0.1.3a0": [ { "comment_text": "", "digests": { "md5": "89da65bc3f838819aa91526fe6516ae5", "sha256": "99037e3f50129dbf3ca9e8eef11c3c934a044e8065b5b8350ab9ac1981d3266d" }, "downloads": -1, "filename": "recurring_ical_events-0.1.3a0.tar.gz", "has_sig": false, "md5_digest": "89da65bc3f838819aa91526fe6516ae5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15283, "upload_time": "2019-03-08T07:12:55", "url": "https://files.pythonhosted.org/packages/19/6d/c3833de25120182b65fd3a4469b7439d46cb6ec7e12757331ec06e5a54d2/recurring_ical_events-0.1.3a0.tar.gz" } ], "0.1.4a0": [ { "comment_text": "", "digests": { "md5": "f893dab59e3645313a908d0b44ffe0a5", "sha256": "fea186cca83aef7cdfba652319fdb5de42ba31d6d7f62fc9965268b8f0d9aa83" }, "downloads": -1, "filename": "recurring_ical_events-0.1.4a0.tar.gz", "has_sig": false, "md5_digest": "f893dab59e3645313a908d0b44ffe0a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17977, "upload_time": "2019-04-29T19:12:26", "url": "https://files.pythonhosted.org/packages/60/75/68b903765b930a921ab1ef13923abc4cd2115dbec623c5b94c767845cef2/recurring_ical_events-0.1.4a0.tar.gz" } ], "0.1.5a0": [ { "comment_text": "", "digests": { "md5": "49293ec033af02816bffc40fc92e83bb", "sha256": "c071da6107e622e06cb9dabc37ce10d451f10ade8b2025b3f2e1b7b49637af66" }, "downloads": -1, "filename": "recurring_ical_events-0.1.5a0.tar.gz", "has_sig": false, "md5_digest": "49293ec033af02816bffc40fc92e83bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18822, "upload_time": "2019-06-25T12:15:08", "url": "https://files.pythonhosted.org/packages/b7/89/97612ab9d4f1deebef7a262dda2b0af68680541daa520d1d75180cb26e5b/recurring_ical_events-0.1.5a0.tar.gz" } ], "0.1.6a0": [ { "comment_text": "", "digests": { "md5": "df39fc2d9a726affa9070ffb60405778", "sha256": "73de0c2af023b83310612e0360aadbce937cf04e8f0ad3f2984cd9068a24b677" }, "downloads": -1, "filename": "recurring_ical_events-0.1.6a0.tar.gz", "has_sig": false, "md5_digest": "df39fc2d9a726affa9070ffb60405778", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19061, "upload_time": "2019-06-27T01:38:08", "url": "https://files.pythonhosted.org/packages/3e/96/730b25ecb2836cbb395fbe50a2da99401e016e36cfa2f706cef6a16dec74/recurring_ical_events-0.1.6a0.tar.gz" } ], "0.1.6b0": [ { "comment_text": "", "digests": { "md5": "ac38de509f0dbd4a163ac5760358b331", "sha256": "d52e0bf0946652af93e2c9bc6a1e893584687b5227e6d9d6e96a7a19b6fd6d52" }, "downloads": -1, "filename": "recurring_ical_events-0.1.6b0.tar.gz", "has_sig": false, "md5_digest": "ac38de509f0dbd4a163ac5760358b331", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19065, "upload_time": "2019-06-27T01:44:04", "url": "https://files.pythonhosted.org/packages/12/fb/5e7a41bf4a6a5a623cdc5de07d8f48d6fbce61a3b547163543f4ae7ac0d0/recurring_ical_events-0.1.6b0.tar.gz" } ], "0.1.7b0": [ { "comment_text": "", "digests": { "md5": "06e8bd7bdff15688745852b91fd0e1f8", "sha256": "5b997ebaba8d46469b5245e87df516ca5b46610e759fd2d8f516bd7cb3c86f35" }, "downloads": -1, "filename": "recurring_ical_events-0.1.7b0.tar.gz", "has_sig": false, "md5_digest": "06e8bd7bdff15688745852b91fd0e1f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19087, "upload_time": "2019-06-27T01:47:55", "url": "https://files.pythonhosted.org/packages/3a/6b/861ca7c5b67413319527f2be18fc1ae5b5749d32ce30b8eaf8407658ef73/recurring_ical_events-0.1.7b0.tar.gz" } ], "0.1.8b0": [ { "comment_text": "", "digests": { "md5": "b6a1d037927d6d81037695f50384256f", "sha256": "38901afb9be21af3073c2b66cb76457cb3bbfc3d78d4236f67f4a79e952a49b8" }, "downloads": -1, "filename": "recurring_ical_events-0.1.8b0.tar.gz", "has_sig": false, "md5_digest": "b6a1d037927d6d81037695f50384256f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19542, "upload_time": "2019-07-16T19:24:50", "url": "https://files.pythonhosted.org/packages/5c/b1/4bd77d5e6732bbf4177bb8c52619dd6abaaea86b5a8b80c815e06ea46f97/recurring_ical_events-0.1.8b0.tar.gz" } ], "0.1.9b0": [ { "comment_text": "", "digests": { "md5": "19246880aa2d2783f3bb556f477a063b", "sha256": "48bb37c0cde37d73988fdbff576f69339c598074954a5f98e9f2db194fcf03ae" }, "downloads": -1, "filename": "recurring_ical_events-0.1.9b0.tar.gz", "has_sig": false, "md5_digest": "19246880aa2d2783f3bb556f477a063b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23049, "upload_time": "2019-08-29T17:36:39", "url": "https://files.pythonhosted.org/packages/65/f1/b69f9bc2637d77eb1a061e7b464717826bc10dd2c6d881e2423632aa074c/recurring_ical_events-0.1.9b0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b56cef1efe87243c7779380ef11b31d2", "sha256": "f8035226fc1ab6d2d60230b81689ee77221ddd92d46eaf4b66f8bb7ea893ba21" }, "downloads": -1, "filename": "recurring_ical_events-0.1.12b0.tar.gz", "has_sig": false, "md5_digest": "b56cef1efe87243c7779380ef11b31d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23603, "upload_time": "2019-10-14T15:54:52", "url": "https://files.pythonhosted.org/packages/f3/60/85cadf52901b86cf0d1a198cc8f5de3f2428586841f066af314c8e70c1d3/recurring_ical_events-0.1.12b0.tar.gz" } ] }