python-cron-descriptor
Port variant v14
Summary Cron expression converter library (3.14)
Package version 2.3.7
Homepage https://github.com/Salamek/cron-descriptor
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v15
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 29 NOV 2026, 19:04:41 UTC
Port created 04 FEB 2026, 12:37:25 UTC
Subpackage Descriptions
single # Cron Descriptor [Python tests] [Donate] A Python library that converts cron expressions into human readable strings. Ported to Python from https://github.com/bradyholt/cron-expression-descriptor. **Author**: Adam Schubert (https://www.salamek.cz) **Original Author & Credit**: Brady Holt (http://www.geekytidbits.com) **License**: [MIT] ## Features * Supports all cron expression special characters including * / , - ? L W, # * Supports 5, 6 (w/ seconds or year), or 7 (w/ seconds and year) part cron expressions * Provides casing options (Sentence, Title, Lower, etc.) * Localization with support for ~31 languages * Supports Python 3.10 - 3.13 ## Installation Using PIP ```bash pip install cron-descriptor ``` Babel is installed automatically. The selected `locale_code` controls sentence translations and weekday/month names without changing the process locale. Missing message catalogs fall back to English. Custom catalogs with a locale identifier unknown to Babel retain their messages and use English calendar names. ## Usage example ### Simple ```python from cron_descriptor import get_description, ExpressionDescriptor print(get_description("* 2 3 * *")) #OR print(str(ExpressionDescriptor("* 2 3 * *"))) ``` ### Advanced ```python # Consult Options.py/CasingTypeEnum.py/DescriptionTypeEnum.py for more info from cron_descriptor import Options, CasingTypeEnum, DescriptionTypeEnum, ExpressionDescriptor descriptor = ExpressionDescriptor( expression = "*/10 * * * *", casing_type = CasingTypeEnum.Sentence, use_24hour_time_format = True ) # GetDescription uses DescriptionTypeEnum.FULL by default: print(descriptor.get_description()) print(f"{descriptor = }") # Or passing Options class as second argument: options = Options() options.casing_type = CasingTypeEnum.Sentence options.use_24hour_time_format = True descriptor = ExpressionDescriptor("*/10 * * * *", options) print(descriptor.get_description(DescriptionTypeEnum.FULL)) ``` ### Expressions with six fields Set `six_field_expression_has_seconds` to select the format: - `None` (default): Use the existing automatic format detection. - `True`: Read the fields as seconds, minutes, hours, day of month, month, and day of week. - `False`: Read the fields as minutes, hours, day of month, month, day of week, and year. This option applies only to expressions with six fields. ```python from cron_descriptor import ExpressionDescriptor, Options, get_description options = Options(locale_code="en_US", six_field_expression_has_seconds=False) print(get_description("* * * * * *", options)) # Every minute # Set the option with an ExpressionDescriptor keyword argument. descriptor = ExpressionDescriptor( "* * * * * *", locale_code="en_US", six_field_expression_has_seconds=False, ) print(descriptor.get_description()) # Every minute
Configuration Switches (platform-specific settings discarded)
PY314 ON Build using Python 3.14 PY315 OFF Build using Python 3.15
Package Dependencies by Type
Build (only) python314:dev:std
python-pip:single:v14
autoselect-python:single:std
Build and Runtime python314:primary:std
Runtime (only) python-babel:single:v14
python-typing-extensions:single:v14
Download groups
main mirror://PYPIWHL/ff/4d/56053e53ffdd1ae331ae18702093af754a5773f56880ca7eeae88410c1f1
Distribution File Information
2fce66253d62228b357434fa827b1cb32a16ee35b9dd9883398a51be0beb7f95 80052 python-src/cron_descriptor-2.3.7-py3-none-any.whl
Ports that require python-cron-descriptor:v14
python-django-celery-beat:v14 Database-backed Periodic Tasks (3.14)