{"id":28137,"library":"recurrent","title":"recurrent","description":"Recurrent is a Python library for parsing and formatting recurring events expressed in natural language (e.g., 'every weekday', 'every 2 weeks on Monday'). The current version is 0.4.1, which has been stable with infrequent releases.","status":"active","version":"0.4.1","language":"python","source_language":"en","source_url":"https://github.com/kvh/recurrent","tags":["natural language","recurring events","RRULE","parsing"],"install":[{"cmd":"pip install recurrent","lang":"bash","label":"pip install recurrent"}],"dependencies":[],"imports":[{"note":"Direct module import yields no parse function; must use explicit import.","wrong":"import recurrent","symbol":"parse","correct":"from recurrent import parse"},{"note":"","wrong":"","symbol":"RecurringEvent","correct":"from recurrent import RecurringEvent"}],"quickstart":{"code":"from recurrent import parse, RecurringEvent\n\nre = RecurringEvent()\nresult = re.parse('every day')\nif result:\n    print(result)  # Outputs: RRULE:FREQ=DAILY\nelse:\n    print('Could not parse')","lang":"python","description":"Basic usage: parse a natural language string into an iCalendar RRULE."},"warnings":[{"fix":"Always check if result is not None, or use the RecurringEvent format method which returns False on failure.","message":"The parse() function returns None on failure, not an exception. Check for None before using the result.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from recurrent import RecurringEvent; r = RecurringEvent(); result = r.parse(...)'.","message":"The module-level parse() function may be removed in future versions. Use RecurringEvent().parse() instead.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Stick to simple English patterns. For complex recurrence rules, consider dateutil.rrule directly.","message":"Parsing is limited to English-like phrases. Non-English input or complex natural language may fail silently.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from recurrent import parse' or 'from recurrent import RecurringEvent'.","cause":"Importing the module directly without importing the parse function or class.","error":"AttributeError: module 'recurrent' has no attribute 'parse'"},{"fix":"Check the result: result = re.parse('input'); if result: ...","cause":"The parse method returned None because the input could not be parsed.","error":"TypeError: 'NoneType' object is not iterable"},{"fix":"Always verify the parse result is not None before accessing its attributes.","cause":"Trying to access a parsed component that doesn't exist because parsing failed.","error":"KeyError: 'month'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}