Metadata-Version: 2.4
Name: bright-horizons-backup
Version: 1.0.0
Summary: A Python client for backing up daily reports and photos from Bright Horizons daycare centers
Author-email: Hadrien Glaude <hadrien.glaude@gmail.com>
Maintainer-email: Hadrien Glaude <hadrien.glaude@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/marsuleouf/bright-horizons-backup
Project-URL: Repository, https://github.com/marsuleouf/bright-horizons-backup
Project-URL: Issues, https://github.com/marsuleouf/bright-horizons-backup/issues
Project-URL: Changelog, https://github.com/marsuleouf/bright-horizons-backup/blob/main/CHANGELOG.md
Keywords: bright-horizons,daycare,backup,scraping,childcare
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: System :: Archiving :: Backup
Classifier: Topic :: Utilities
Requires-Python: >=3.8.1
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: playwright>=1.40.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: viewer
Requires-Dist: flask>=2.0.0; extra == "viewer"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: tox>=4.0.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Requires-Dist: bandit>=1.7.0; extra == "dev"
Requires-Dist: safety>=3.0.0; extra == "dev"
Dynamic: license-file

# Bright Horizons Backup

Backup your child's daily reports, photos, and activities from Bright Horizons daycare centers.

## Installation

### Using pip
```bash
pip install bright-horizons-backup
playwright install chromium
```

### Using uv (recommended)
```bash
uv add bright-horizons-backup
uv run playwright install chromium
```

## Setup

Create a `.env` file with your Bright Horizons login:

```env
BH_EMAIL=your_email@example.com
BH_PASSWORD=your_password
```

## Usage

### 1. Backup Your Data

```bash
# Basic backup
bright-horizons-backup

# Custom output folder
bright-horizons-backup --output-dir ./my_backup

# Use different credentials
bright-horizons-backup --email user@example.com --password mypassword
```

### 2. View Your Backups

```bash
# Install with viewer support
pip install bright-horizons-backup[viewer]
# Or with uv: uv add bright-horizons-backup[viewer]

# Launch web viewer
bright-horizons-viewer

# View specific backup
bright-horizons-viewer ./output_20240101_120000
```

The viewer opens at http://localhost:5000 with a timeline view, photo gallery, and monthly organization.

## What Gets Backed Up

- Daily reports with teacher notes
- Photos and videos
- Activity descriptions
- All organized by child and date

## Output Files

The backup creates organized folders:

```
output_20240101_120000/
├── parent_profile.json          # Your account information
├── dependents.json              # List of your children
└── Child_Name_ID/
    ├── dependent.json          # Child's profile info
    ├── raw/
    │   └── batch_*.json        # Raw API responses
    ├── processed/
    │   └── 2023-01-15.json     # Daily reports with notes
    └── media/
        ├── photo_*.jpg         # Downloaded photos
        └── video_*.mp4         # Downloaded videos
```

Additional files created:
- `bh_state.json` - Saved login session (reused for future runs)
- `run_*` folders - Browser screenshots, videos, and debug traces from login process

## Development

### Setup
```bash
# Clone repository
git clone https://github.com/marsuleouf/bright-horizons-backup.git
cd bright-horizons-backup

# Install with uv (recommended)
uv sync --extra dev --extra viewer
playwright install chromium

# Setup pre-commit hooks
uv run pre-commit install
```

### Testing
```bash
# Run tests
uv run pytest

# Run with coverage
uv run pytest --cov

# Run across Python versions
uv run tox
```

## Troubleshooting

**Login issues:** Check your email/password in the `.env` file. Inspect the `run_*` folder for screenshots and videos of the login process.
**Browser errors:** Run `playwright install chromium`
**Permission errors:** Make sure you have write access to the output directory

## License

MIT License - see [LICENSE](LICENSE) file.

## Disclaimer

For personal use only. Respect Bright Horizons' terms of service. Not affiliated with Bright Horizons.
