Metadata-Version: 2.4
Name: pindora-python
Version: 0.0.1
Summary: A python3 module for reading and changing status of pindora devices through API.
Project-URL: Homepage, https://github.com/ampujl/pindora-python
Project-URL: Bug Tracker, https://github.com/ampujl/pindora-python/issues
Author-email: Lauri Ampuja <lauri.ampuja@gmail.com>
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Requires-Dist: click
Requires-Dist: multipledispatch
Requires-Dist: requests
Description-Content-Type: text/markdown

# Pindora Python Client

A python3 module for reading and changing status of Pindora devices through their API. This package provides both a library and a command-line interface (CLI) for interacting with the Pindora API.

## Installation

You can install the package from PyPI:

```bash
pip install pdora_ampujl
```

## Usage

### As a Library

To use the library, import the `Pindora` class and initialize it with your API key.

```python
from pindora import Pindora

# Replace 'YOUR_API_KEY' with your actual Pindora API key
api_key = 'YOUR_API_KEY'
pindora_client = Pindora(api_key)

# Example: List all Pindora devices
pindoras = pindora_client.list_pindoras()
print(pindoras)

# Example: Read a specific Pindora device
pindora_device = pindora_client.read_pindora('DEVICE_ID')
print(pindora_device)
```

### As a Command-Line Tool

The package also provides a command-line interface for managing Pindora devices and PIN codes.

First, you need to provide your API key as an argument.

```bash
python -m pindora <YOUR_API_KEY> [COMMAND]
```

Here are the available commands:

#### Pindora Devices

- `pindora list`: List all Pindora devices.
- `pindora read <ID>`: Read a specific Pindora device.
- `pindora update <ID> --name <NAME> [--partymode]`: Update a Pindora device's name and party mode.
- `pindora open --url1 <URL1> [--url2 <URL2>] --code <CODE>`: Open a Pindora lock.

#### PIN Codes

- `pin list`: List all PIN codes.
- `pin create <CODE> --name <NAME>`: Create a new PIN code.
- `pin update <CODE> --name <NAME>`: Update a PIN code's name.
- `pin delete <CODE>`: Delete a PIN code.

#### Piccolo Devices

- `piccolo list`: List all Piccolo devices.
- `piccolo read <ID>`: Read a specific Piccolo device.

## API Key

You need a Pindora API key to use this library. You can obtain one by contacting Pindora.

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.
