Registry / serialization / recurrent

recurrent

JSON →
library0.4.1pypypi✓ verified 87d ago

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.

pip install recurrent
INSTALL
IMPORT
SIG · RECURRENT
R
recurrent
serializationpythonv0.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse
✓ from recurrent import parse
✗ import recurrent
Direct module import yields no parse function; must use explicit import.
RecurringEvent
✓ from recurrent import RecurringEvent

Basic usage: parse a natural language string into an iCalendar RRULE.

from recurrent import parse, RecurringEvent re = RecurringEvent() result = re.parse('every day') if result: print(result) # Outputs: RRULE:FREQ=DAILY else: print('Could not parse')
Debug
Known issues
gotchaThe parse() function returns None on failure, not an exception. Check for None before using the result.
fix
Always check if result is not None, or use the RecurringEvent format method which returns False on failure.
affects: all
deprecatedThe module-level parse() function may be removed in future versions. Use RecurringEvent().parse() instead.
fix
Use 'from recurrent import RecurringEvent; r = RecurringEvent(); result = r.parse(...)'.
affects: >=0.4.0
gotchaParsing is limited to English-like phrases. Non-English input or complex natural language may fail silently.
fix
Stick to simple English patterns. For complex recurrence rules, consider dateutil.rrule directly.
affects: all
Errors
Common errors & fixes
AttributeError: module 'recurrent' has no attribute 'parse'
Importing the module directly without importing the parse function or class.
fix
Use 'from recurrent import parse' or 'from recurrent import RecurringEvent'.
TypeError: 'NoneType' object is not iterable
The parse method returned None because the input could not be parsed.
fix
Check the result: result = re.parse('input'); if result: ...
KeyError: 'month'
Trying to access a parsed component that doesn't exist because parsing failed.
fix
Always verify the parse result is not None before accessing its attributes.
Upgrade
Version history
0.4.1latest on PyPI · released Aug 16, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
recurrent — pip install recurrent · libregistry