Metadata-Version: 2.4
Name: scheduling-link
Version: 0.1.0
Summary: Get availability from scheduling provider booking pages
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: httpx>=0.20
Requires-Dist: python-dateutil>=2.7
Requires-Dist: tzlocal>=5
Description-Content-Type: text/markdown

# scheduling-link

Extracts availability from public scheduling links — no browser automation, no API keys.

```json
{
  "timezone": "America/New_York",
  "slots": {
    "2026-05-01": [
      {"start": "16:00", "end": "16:30"},
      {"start": "16:30", "end": "17:00"}
    ]
  }
}
```

Supported providers: **Calendly**, **Acuity Scheduling**, **Cal.com**, **zcal**.

## Install

Requires Python 3.10+.

```bash
# Run the CLI (one-off, no install)
uvx scheduling-link <url>

# As a library in your project
uv add scheduling-link
```

## CLI

```bash
scheduling-link <url> [-d N] [-f {json,pretty,yaml}]
```

| Flag | Default | Description |
|------|---------|-------------|
| `--days N` / `-d N` | `14` | Days ahead to fetch |
| `--format` / `-f` | `json` | `json` (compact), `pretty`, or `yaml` |
| `--timezone TZ` / `--tz` / `-t` | system local | Output timezone (IANA name, e.g. `America/New_York`) |

Run with no arguments to see the supported providers.

```bash
scheduling-link https://calendly.com/username/30min | jq '.slots["2026-05-01"]'
scheduling-link https://cal.com/username/30min -f pretty
scheduling-link https://zcal.co/username/30min -d 7 -f yaml
scheduling-link https://zcal.co/username/30min --tz Asia/Tokyo
```

## Library

```python
from scheduling_link import availability

result = availability("https://calendly.com/username/30min", days=7)
print(result["timezone"])  # "America/New_York"
print(result["slots"])     # {"2026-05-01": [{"start": "09:00", "end": "09:30"}, ...]}

# Override the output timezone
result = availability("https://cal.com/x/y", days=7, timezone="Asia/Tokyo")
```

## Development

See [docs/development.md](docs/development.md) for setup, tests, architecture, and how to add a new provider.

## License

MIT — see [LICENSE](LICENSE).
