Metadata-Version: 2.1
Name: click-pendulum
Version: 0.1.0
Summary: Pendulum type support for click.
License: MIT
Author: Dawson R
Author-email: 105720-ddaws@users.noreply.gitlab.com
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: click (>=8.0.0,<9.0.0)
Requires-Dist: pendulum (>=3.0.0,<4.0.0)
Requires-Dist: wheel (>=0.44.0,<0.45.0)
Description-Content-Type: text/markdown

# Click Datetime

Click support for Python's `datetime` types to allow developers to easy parse 
date strings as parameters to Python click CLIs.

## Example

You can accept a datetime as a parameter to your click CLI

```python
from datetime import datetime
import click
from click_datetime import Datetime


@click.option(
    "--date",
    type=Datetime(format="%Y-%m-%d"),
    default=datetime.now(),
    help="An example parsing and printing a datetime.",
)
@click.command()
def cli(date: datetime):
    click.echo("The date : {0}".format(date))


if __name__ == "__main__":
    cli()  # type: ignore
```

```bash
$ python main.py --date=2016-01-01
```

## Installation

```bash
pip install click-datetime
```

## Development

### Building and packaging

```bash
poetry build
```

### Testing the compiled wheel

```bash
# Create a virtual environment for testing
python -m .venv/test
source .venv/test/bin/activate

# Confirm importing and exporting is correct
python -c 'import click_datetime as cd; print(dir(cd))'
```

## Authors

- Dawson Reid (@ddaws)

