Metadata-Version: 2.4
Name: pyfamilysafety
Version: 2.0.0
Summary: Microsoft Family Safety API library
Home-page: http://github.com/pantherale0/pyfamilysafety
Author: pantherale0
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8, <4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.7.0
Requires-Dist: python-dateutil>=2.7.0
Provides-Extra: dev
Requires-Dist: bandit<1.9,>=1.7; extra == "dev"
Requires-Dist: black<26,>=23; extra == "dev"
Requires-Dist: build==0.10.*; extra == "dev"
Requires-Dist: flake8<8,>=6; extra == "dev"
Requires-Dist: isort<7,>=5; extra == "dev"
Requires-Dist: mypy<1.19,>=1.5; extra == "dev"
Requires-Dist: pytest<9,>=7; extra == "dev"
Requires-Dist: pytest-cov<8,>=4; extra == "dev"
Requires-Dist: twine<7,>=4; extra == "dev"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Microsoft Family Safety Python Module

An async Python client for the Microsoft Family Safety mobile aggregator API.

## Installation

```bash
pip install pyfamilysafety
```

## Documentation

**Full documentation:** [https://pantherale0.github.io/pyfamilysafety/](https://pantherale0.github.io/pyfamilysafety/)

Covers authentication, user guides, API reference, and advanced topics.

## Home Assistant

Looking for the Home Assistant integration? See [ha-familysafety](https://github.com/pantherale0/ha-familysafety).

## Quick example

```python
import asyncio
from pyfamilysafety import Authenticator, FamilySafety

async def main():
    auth = await Authenticator.create(token="...")  # OAuth redirect URL
    fs = FamilySafety(auth)
    await fs.update()
    for account in fs.accounts:
        print(account.first_name, account.today_screentime_usage)

asyncio.run(main())
```

See the [Authentication guide](https://pantherale0.github.io/pyfamilysafety/getting-started/authentication/) for obtaining the OAuth redirect URL.

## License

MIT — see [LICENSE](LICENSE).

## Sources / tools used

- https://www.reddit.com/r/learnpython/comments/4d4wpf/microsoft_web_login_with_requests/
- Microsoft Family Safety Android
- mitmproxy
