Metadata-Version: 2.2
Name: findmydevice
Version: 0.10.0
Summary: A Python package for interacting with the findmydevice API.
Author-email: Dennis Schwertel <s@digitalkultur.net>
License: MIT License
        
        Copyright (c) 2025 Dennis Schwertel
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: argon2-cffi
Requires-Dist: attrs
Requires-Dist: requests
Requires-Dist: cryptography
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"

# Unofficial FindMyDeviceServer Python Client

This is an unofficial Python package that allows you to interact with the [FindMyDeviceServer](https://gitlab.com/Nulide/findmydeviceserver) API. FindMyDeviceServer is a server designed to communicate with the FMD Android app, helping you locate and control your devices.

It's main use is currently a reimplementation of the crypto and authentication involved when communicating with the api. 

## ✨ Features and working commands

- Authenticate to the FindMyDeviceServer API.
- Send a "ring" to the server


## 📦 Installation

```sh
pip install findmydevice
```

## 🚀 Quick start

In this example, we create a reactor based on the data from this URL https://api.balkongas.de/metrics/6f1d3382-6b95-4adc-9d6f-6785ae0456f3/json/latest/


```python
from findmydevice import FMDClient
import logging 

logging.basicConfig(level=logging.DEBUG)
client = FMDClient('http://xyz.de', 'fmd_id', 'fmd_password')
client.authenticate()
client.ring()
```


## 🚀 Development

### 1️⃣ Setup a Local Development Environment

1. **Clone the repository**
   ```sh
   git clone https://github.com/kinkerl/findmydevice_python.git
   cd findmydevice_python
   ```
2. **Create a virtual environment**
   ```sh
   python -m venv .venv
   ```
3. **Activate the virtual environment**
   - **macOS/Linux:**
     ```sh
     source .venv/bin/activate
     ```
   - **Windows (CMD):**
     ```sh
     .venv\Scripts\activate
     ```
   - **Windows (PowerShell):**
     ```sh
     .venv\Scripts\Activate.ps1
     ```
4. **Install dependencies**
   ```sh
   pip install -e .[dev]
   ```

### 2️⃣ Running Tests
To run tests using `pytest`, use:
```sh
pytest
```

### 3️⃣ Building the Package
To build the package, run:
```sh
python -m build
```
This will generate a `dist/` directory with `.tar.gz` and `.whl` files.

### 4️⃣ Uploading to PyPI
1. **Ensure you have Twine installed**
   ```sh
   pip install twine
   ```
2. **Upload the package**
   ```sh
   twine upload dist/*
   ```
3. **Verify installation from PyPI**
   ```sh
   pip install findmydevice
   ```

