semvec/pypi-packages huggingface dataset:
philipstv 3.0.2
CLI and library to control Philips Android-powered TVs.
License: MIT
Requires Python: >=3.10
Keywords: ambilight, api-wrapper, cli, philips, tv

philipstv
=========

.. image:: https://github.com/bcyran/philipstv/actions/workflows/test.yml/badge.svg
   :target: https://github.com/bcyran/philipstv/actions/workflows/test.yml
   :alt: test

.. image:: https://github.com/bcyran/philipstv/actions/workflows/release.yml/badge.svg
   :target: https://github.com/bcyran/philipstv/actions/workflows/release.yml
   :alt: release

.. image:: https://codecov.io/gh/bcyran/philipstv/branch/master/graph/badge.svg?token=ROJONX34RB
   :target: https://codecov.io/gh/bcyran/philipstv
   :alt: codecov

.. image:: https://readthedocs.org/projects/philipstv/badge/?version=latest
   :target: https://philipstv.readthedocs.io/en/stable/?badge=latest
   :alt: Documentation status

.. image:: https://img.shields.io/pypi/v/philipstv
   :target: https://pypi.org/project/philipstv/
   :alt: pypi

.. image:: https://img.shields.io/pypi/pyversions/philipstv
   :target: https://pypi.org/project/philipstv/
   :alt: versions

.. image:: https://img.shields.io/github/license/bcyran/philipstv
   :target: https://github.com/bcyran/philipstv/blob/master/LICENSE
   :alt: license

.. -begin-intro-

Python package providing CLI and library for interacting with Philips Android-powered TVs.

Features:

- Get and set TV power state.
- Get and set volume.
- List and change TV channels.
- Emulate pressing remote keys.
- Get and set Ambilight power state.
- Get and set Ambilight color.
- List and launch applications.

Installation
------------

Package Repositories
^^^^^^^^^^^^^^^^^^^^

.. image:: https://repology.org/badge/vertical-allrepos/philipstv.svg
   :target: https://repology.org/project/philipstv/versions
   :alt: Packaging status

PyPI
^^^^

If you plan to use the CLI:

.. code-block:: console

   $ pip install 'philipstv[cli]'

If you only need library for use in Python code:

.. code-block:: console

   $ pip install philipstv

.. -end-intro-

Arch Linux (AUR)
^^^^^^^^^^^^^^^^

`philipstv AUR package <https://aur.archlinux.org/packages/philipstv>`_ is available.


Documentation
-------------
See full documentation: `Read the Docs: philipstv <https://philipstv.readthedocs.io>`_.

See also
--------
- `PhilipsTV GUI <https://github.com/bcyran/philipstv-gui>`_ - GUI application built with this library.

Resources
---------
- `Fantastic unofficial API documentation <https://github.com/eslavnov/pylips/blob/master/docs/Home.md>`_ and `script <https://github.com/eslavnov/pylips>`_ by `@eslavnov <https://github.com/eslavnov>`_.
- Philips `JointSpace API documentation <http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/1/doc/API.html>`_.
agastya 1.2.1
High-performance web scraping and MongoDB utilities
License: MIT
Requires Python: >=3.8

# Agastya

High-performance web scraping and MongoDB utilities for Python.

## Features

- **CustomLogger**: Fast, color-coded logging with minimal overhead
- **Record**: Lightweight MongoDB document wrapper with state management
- **fetch()**: Smart HTTP client with caching, retries, and validation
- **clean_dict()**: Comprehensive text/HTML cleaning utilities
- **run_engine()**: Adaptive concurrent task executor with auto-scaling threads

## Installation

```bash
pip install agastya
```

## Quick Start

### Basic Usage

```python
from agastya import fetch, CustomLogger, Record

# Initialize logger
logger = CustomLogger(name=__file__)

# Fetch with caching
response = fetch(
    url="https://example.com",
    save_dir="cache",
    filename="page.html",
    max_retries=3
)

# Work with MongoDB records
from pymongo import MongoClient
db = MongoClient()['mydb']
collection = db['items']

doc = collection.find_one({"_id": "123"})
record = Record(doc, collection, logger)

# Mark states
record.mark_done("scraped", meta={"items": 42})
record.mark_fail("parsed", meta={"error": "timeout"})
```

### Configuration

Create a `config.py` in your project root:

```python
from pymongo import MongoClient

client = MongoClient("mongodb://localhost:27017")
db = client['your_database']
```

### Advanced Features

**Smart caching with validation:**
```python
response = fetch(
    url="https://example.com/data",
    save_dir="cache",
    filename="data.html",
    valid_rules={
        "required": ["expected text"],
        "forbidden": ["error", "404"],
        "remove": True  # delete invalid cache
    }
)
```

**Concurrent processing:**
```python
from agastya import run_engine
from pymongo import MongoClient

db = MongoClient()['mydb']
collection = db['tasks']

def worker(doc):
    # Process document
    print(f"Processing {doc['_id']}")

query = {"status": "pending"}
run_engine(collection, query, worker, THREADS_START=50)
```

## Requirements

- Python 3.8+
- requests
- lxml
- pymongo
- urllib3

## Development

```bash
# Clone repository
git clone https://github.com/yourusername/agastya.git
cd agastya

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest
```

## License

MIT License - see LICENSE file for details