Metadata-Version: 2.4
Name: ulid-dates
Version: 0.1.1
Summary: Determine ULID prefixes for date ranges
Author-email: Rodney Haywood <rodos@haywood.org>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Iamrodos/ulid-dates
Project-URL: Issues, https://github.com/Iamrodos/ulid-dates/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: py-ulid>=1.0.3
Dynamic: license-file

# ULID Dates

A Python utility to determine ULID prefixes for date ranges.

This can be useful for querying databases or logs for ULIDs that fall within a specific time period.

## Installation

Install the package using `pip`:

```bash
pip install ulid-dates
```

Alternatively, using `uv`:

```bash
uv pip install ulid-dates
```

## Usage

```python
from datetime import datetime, timedelta
from ulid_dates import ulid_prefix_range_for_dates

start_date = datetime(2023, 1, 1)
end_date = start_date + timedelta(days=1)

start_prefix, end_prefix = ulid_prefix_range_for_dates(start_date, end_date)

print(f"ULID prefix for {start_date}: {start_prefix}")
print(f"ULID prefix for {end_date}: {end_prefix}")
```

## Development

To set up the development environment:

1. Clone the repository.
2. Create a virtual environment and activate it.
3. Install the dependencies in editable mode.

Using `pip`:
```bash
pip install -e .[dev]
```

Alternatively, using `uv`:

```bash
uv pip install -e .[dev]
```

### Running Tests

To run the tests, use `pytest`:

```bash
pytest
```
