{"id":17500725,"url":"https://github.com/ddaws/click-pendulum","last_synced_at":"2026-07-17T10:34:24.292Z","repository":{"id":256316513,"uuid":"854887713","full_name":"ddaws/click-pendulum","owner":"ddaws","description":"Pendulum type support for click","archived":false,"fork":false,"pushed_at":"2024-09-12T01:27:40.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T22:59:56.716Z","etag":null,"topics":["cli","click","datetime","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/click-pendulum/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ddaws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-09T23:55:24.000Z","updated_at":"2024-09-12T01:27:43.000Z","dependencies_parsed_at":"2024-09-12T10:27:28.270Z","dependency_job_id":null,"html_url":"https://github.com/ddaws/click-pendulum","commit_stats":null,"previous_names":["ddaws/click-pendulum"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaws%2Fclick-pendulum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaws%2Fclick-pendulum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaws%2Fclick-pendulum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddaws%2Fclick-pendulum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddaws","download_url":"https://codeload.github.com/ddaws/click-pendulum/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246467446,"owners_count":20782308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","click","datetime","python"],"created_at":"2024-10-19T18:50:45.591Z","updated_at":"2025-10-25T08:06:59.919Z","avatar_url":"https://github.com/ddaws.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Click Pendulum\n\nClick support for Pendulum date, time, interval and duration types to allow \ndevelopers to easily parse strings as parameters to Python click CLIs.\n\n```bash\npip install click-pendulum\n```\n\n## Examples \n\n### `pendulum.DateTime`\n\nYou can accept a Pendulum DateTime as a parameter to your click CLI\n\n```python\nimport click, pendulum\nfrom click_pendulum import DateTime\n\n@click.option(\n    \"--date\",\n    type=DateTime(),\n    default=pendulum.now(),\n    help=\"An example parsing and printing a datetime.\",\n)\n@click.command()\ndef cli(date: pendulum.DateTime):\n    click.echo(\"The date : {0}\".format(date))\n\nif __name__ == \"__main__\":\n    cli()  # type: ignore\n```\n\n```bash\n$ python examples/datetime_with_custom_format.py --date=2016-01-01\nThe date : 2016-01-01 00:00:00+00:00\n```\n\n### `pendulum.Duration`\n\nYou can accept a Pendulum Duration as a parameter to your click CLI\n\n```python\nimport click, pendulum\nfrom click_pendulum import Duration\n\n@click.option(\n    \"--duration\",\n    type=Duration(),\n    help=\"Parse a duration string.\",\n)\n@click.command()\ndef cli(duration: pendulum.Duration):\n    click.echo(f\"Duration: {duration}\")\n\nif __name__ == \"__main__\":\n    cli()  # type: ignore\n```\n\n```bash\n$ python examples/duration_parser.py --duration=\"2d5h\"\nDuration: 2 days 5 hours\n```\n\n## Authors\n\n- Dawson Reid (@ddaws)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddaws%2Fclick-pendulum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddaws%2Fclick-pendulum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddaws%2Fclick-pendulum/lists"}