Metadata-Version: 2.5
Name: python-ring
Version: 0.10.0
Summary: Python library for Ring doorbells, cameras, chimes and intercoms
Project-URL: homepage, https://github.com/cyberjunky/python-ring
Project-URL: repository, https://github.com/cyberjunky/python-ring
Project-URL: Bug Tracker, https://github.com/cyberjunky/python-ring/issues
Author: Ron Klinkien, python-ring-doorbell developers
License: LGPL-3.0-or-later
License-File: LICENSE
Keywords: camera,door bell,home automation,ring
Classifier: Environment :: Other Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Home Automation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11.0
Requires-Dist: aiofiles>=23
Requires-Dist: aiohttp>=3.14
Requires-Dist: async-timeout>=3.0.0
Requires-Dist: asyncclick>=8.1.7.1
Requires-Dist: firebase-messaging>=0.4.0
Requires-Dist: oauthlib<5,>=4.0.1
Requires-Dist: pytz>=2022.0
Requires-Dist: typing-extensions<5.0,>=4.12.2
Requires-Dist: websockets>=13.0.0
Description-Content-Type: text/markdown

# python-ring

Python library for Ring doorbells, cameras, chimes and intercoms.

It's a maintained continuation of
[python-ring-doorbell](https://github.com/python-ring-doorbell/python-ring-doorbell),
which hasn't had a release since February 2026. It adds the newer Ring devices,
fixes for the event listener and WebRTC streams, and a few new features. See
[CHANGELOG.md](CHANGELOG.md).

## Install

```
pip install python-ring
```

The import name is `python_ring`:

```python
import asyncio
import getpass

from python_ring import Auth, Requires2FAError, Ring


async def main() -> None:
    auth = Auth("MyProject/1.0")
    username = input("Username: ")
    password = getpass.getpass("Password: ")
    try:
        await auth.async_fetch_token(username, password)
    except Requires2FAError:
        await auth.async_fetch_token(username, password, input("2FA code: "))

    ring = Ring(auth)
    await ring.async_update_data()
    for device in ring.devices().all_devices:
        print(device.name, device.model)
    await auth.async_close()


asyncio.run(main())
```

There's also a command line tool, `python-ring`. Run `python-ring --help` to
see what it can do.

## Home Assistant

A custom Ring integration that uses this library is available at
[cyberjunky/home-assistant-ring](https://github.com/cyberjunky/home-assistant-ring).

## Development

```
uv sync
uv run pytest
```

On Windows, add `--force-enable-socket` to the pytest command. The asyncio
event loop there needs a local socket.

## License and credits

LGPL-3.0-or-later, see [LICENSE](LICENSE).

This project is derived from python-ring-doorbell, copyright the
python-ring-doorbell developers, and is distributed under the same license. The
changes made since version 0.9.14 are listed in [CHANGELOG.md](CHANGELOG.md).
