semvec/pypi-packages huggingface dataset:
pihole6api 0.2.1
Python API Client for Pi-hole 6
License: MIT
Requires Python: >=3.8
Keywords: pihole, dns, adblocking, api, client

# 🍓 pihole6api

This package provides a simple, modular SDK for the PiHole 6 REST API.

## Features

* Automatically handles authentication and renewal
* Graceful error management
* Logically organized modules
* Easily maintained

## Installation

**Install using `pip`:**

```bash
pip install pihole6api
```

**Install from source:**

```bash
git clone https://github.com/sbarbett/pihole6api.git
cd pihole6api
pip install -e .
```

## Quick Start

### Initialize the Client

```python
from pihole6api import PiHole6Client
client = PiHole6Client("https://your-pihole.local/", "your-password")
```

### Example Usage

#### Get Pi-Hole Metrics

```python
history = client.metrics.get_history()
print(history)  # {'history': [{'timestamp': 1740120900, 'total': 0, 'cached': 0 ...}]}
queries = client.metrics.get_queries()
print(queries)
```

#### Enable/Disable Blocking

```python
client.dns_control.set_blocking_status(False, 60)
print(client.dns_control.get_blocking_status()) # {'blocking': 'disabled', 'timer': 60 ...}
```

#### Manage Groups

```python
client.group_management.add_group("Custom Group", comment="For testing")
client.group_management.delete_group("Custom Group")
```

#### Manage Domains

```python
client.domain_management.add_domain("ads.example.com", "deny", "exact")
client.domain_management.delete_domain("ads.example.com", "deny", "exact")
```

#### Manage Links

```python
client.list_management.add_list("https://example.com/blocklist.txt", "block")
client.list_management.delete_list("https://example.com/blocklist.txt", "block")
```

#### Export/Import PiHole Settings

```python
# Export settings and save as a .zip file
with open("pihole-settings.zip", "wb") as f:
    f.write(client.config.export_settings())

client.config.import_settings("pihole-settings.zip", {"config": True, "gravity": {"group": True}})
```

#### Flush Logs & Restart DNS

```python
client.actions.flush_logs()
client.actions.restart_dns()
```

## API Modules

| Module                | Description |
|----------------------|-------------|
| `metrics`           | Query history, top clients/domains, DNS stats |
| `dns_control`       | Enable/disable blocking |
| `group_management`  | Create, update, and delete groups |
| `domain_management` | Allow/block domains (exact & regex) |
| `client_management` | Manage client-specific rules |
| `list_management`   | Manage blocklists (Adlists) |
| `config`            | Modify Pi-hole configuration |
| `ftl_info`          | Get Pi-hole core process (FTL) info |
| `dhcp`              | Manage DHCP leases |
| `network_info`      | View network devices, interfaces, routes |
| `actions`           | Flush logs, restart services |

## Contributing

Please check [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for a list of changes.

## License

This project is license under the [MIT license](LICENSE).
patch-package-py 0.1.5
patch 3rd party Python packages
License: MIT
Requires Python: >=3.9

# patch-package-py

A Python package patching tool that allows you to make and apply patches to third-party packages in your virtual environment.

## Installation

```bash
uv add patch-package-py
```

## Usage

The tool provides three main commands via the `p12y` CLI:

### 1. Create a patch workspace

```bash
p12y patch <package_name>
```

This command:

- Resolves the package from an environment path
  - if omitted, it detects from the current directory (`/.venv`)
- Creates a temporary virtual environment
- Installs the same version of the package without dependencies
- Sets up a git repository for tracking changes
- Provides a path where you can edit the package files

Example:

```bash
p12y patch requests [-e <environment-path>]
```

### 2. Commit changes and create patch file

```bash
p12y commit <edit_path>
```

After editing the package files, use this command to:

- Generate a git diff of your changes
- Create a `.patch` file in the `patches/` directory
- Test that the patch can be applied successfully

Example:

```bash
p12y commit /tmp/patch-requests-2.28.1-abc123/venv/lib/python3.11/site-packages/requests
```

### 3. Apply patches

```bash
p12y apply [-e <environment-path>]
```

This command:

- Looks for `.patch` files in the `patches/` directory
- Applies them to the packages in the environment path
  - if omitted, it detects from the current directory (`/.venv`)
- Reports success/failure for each patch

## Workflow

1. **Prepare for patching**: Run `p12y patch <package_name>` to set up a workspace
2. **Make your changes**: Edit the files in the provided path
3. **Create the patch**: Run `p12y commit <path>` to generate the patch file
4. **Apply patches**: Run `p12y apply` in your project to apply all patches

## How it works

- Uses `uv` for fast virtual environment creation and package installation
- Leverages git for tracking changes and generating diffs
- Stores patch files in a `patches/` directory in your project root
- Patch files are named using the format: `<package-name>+<version>.patch`

## Using with poetry

- detect the environment path using `poetry show -v`
- use the -e / --env-path option for patch and/or apply.

## Requirements

- Python ≥ 3.9
- `uv` package manager
- `git` version control system
- `patch` utility (typically pre-installed on Unix-like systems)
  - for windows you can install
    - using chocolatey: `choco install patch`
    - using winget `winget install --id=GnuWin32.Patch -e`
    - or it might be packed with cygwin.

## License

MIT
nlopt 2.10.0
Library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization
License: MIT
Requires Python: >=3.9
Keywords: algorithms, global local constrained unconstrained optimization, optimization, non-linear optimization

NLopt Python
============

[![PyPI version](https://badge.fury.io/py/nlopt.svg)](https://badge.fury.io/py/nlopt)
![Build](https://github.com/DanielBok/nlopt-python/workflows/Build/badge.svg?branch=master)

This project builds Python wheels for the NLopt library. NLopt contains various routines for non-linear optimization.

## Versions supported

The project supports Python versions 3.9+ and above for Windows, MacOS, and Linux.

## Installation

```bash
pip install nlopt
```

## Documentation

For more information on how to use NLopt, refer to the [documentation](https://nlopt.readthedocs.io/en/latest/NLopt_Python_Reference/).