semvec/pypi-packages huggingface dataset:
plexcontentmanager 0.1.1
A command-line tool for managing and curating Plex Media Server content
Requires Python: >=3.6

# Plex Content Manager

[![PyPI version](https://img.shields.io/pypi/v/plexcontentmanager.svg)](https://pypi.org/project/plexcontentmanager/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![GitHub](https://img.shields.io/github/stars/alexboutros/plexcontentmanager?style=social)](https://github.com/alexboutros/plexcontentmanager)

A command-line tool for managing and curating Plex Media Server content.

## Features

- Connect to your Plex server securely
- List all empty collections across your libraries
- Delete empty collections with confirmation
- Batch operations with force option to skip confirmations

## Installation

### From PyPI (Recommended)

```bash
pip install plexcontentmanager
```

### If you encounter an "externally-managed-environment" error, use one of these alternative installation methods:

### Using pipx
```bash
# Install pipx if not already installed
pip install --user pipx
pipx ensurepath

# Install plexcontentmanager
pipx install plexcontentmanager
```

### Using a virtual environment
```bash
# Create a virtual environment
python -m venv venv

# Activate the virtual environment
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install plexcontentmanager
pip install plexcontentmanager
```

### From Source
```bash
git clone https://github.com/alexboutros/plexcontentmanager.git
cd plexcontentmanager
pip install -e .
```

## Usage
### Configuration
First, configure your Plex server connection:
```bash
plexcontent config --server "https://your-plex-server:32400" --token "your-plex-token"
```
You can view your current configuration:
```bash
plexcontent config
```

### Test Connection
Verify that your connection to the Plex server is working:
```bash
plexcontent test-connection
```

### Managing Collections
List all empty collections:
```bash
plexcontent list-empty-collections
```

Delete empty collections (with confirmation):
```bash
plexcontent delete-empty-collections
```

Delete empty collections without confirmation:
```bash
plexcontent delete-empty-collections --force
```

## Finding Your Plex Token
https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

## Security & Privacy

This application stores your Plex token locally in `~/.plexcontentmanager/config.json`. The token is:
- Never transmitted to any server other than your specified Plex server
- Stored as plaintext in the configuration file
- Only used to authenticate with your Plex server

For security reasons:
- The source code is available on [GitHub](https://github.com/alexboutros/plexcontentmanager) for review
- You can optionally use a dedicated Plex account with limited permissions for this tool
- You can delete the configuration file (`~/.plexcontentmanager/config.json`) when not in use
torrotate 0.1.0
A drop-in replacement for requests that routes through Tor with IP rotation
Requires Python: >=3.7

# TorRotate

A drop-in replacement for the Python `requests` library that routes traffic through Tor with automatic IP rotation.

## Features

- Seamless drop-in replacement for the requests library
- Automatic IP rotation based on request count
- Manual IP rotation available when needed
- Configure Tor directly from Python
- Cross-platform support (Linux, macOS, Windows with limitations)

## Installation

```bash
pip install torrotate
```

## Requirements

- Python 3.7+
- Tor service installed and running
- Tor control port enabled and accessible

## Quick Start

```python
import torrotate

# Configure with default settings
torrotate.configure()

# Make requests through Tor
response = torrotate.requests.get("https://api.ipify.org?format=json")
print(f"Current IP: {response.json()['ip']}")

# Force IP rotation
torrotate.force_new_ip()

# Make another request with new IP
response = torrotate.requests.get("https://api.ipify.org?format=json")
print(f"New IP: {response.json()['ip']}")
```

## Advanced Configuration

Make sure you specify tor_control_password in your script before using torrotate.requests
```python
import torrotate

torrotate.configure(tor_control_password="LFbEWR4Vecek9xif")

print(torrotate.requests.get("https://httpbin.org/get?word=test123").text)
```

```python
torrotate.configure(
    tor_control_port=9051,                # Tor control port number
    tor_control_password="your_password", # Password for Tor control port
    proxy_host="127.0.0.1",               # Tor SOCKS proxy host
    proxy_port=9050,                      # Tor SOCKS proxy port
    rotate_every=10,                      # Rotate IP every 10 requests
    rotation_delay=3,                     # Wait 3 seconds after rotation
    max_rotation_attempts=5,              # Try up to 5 times to get a new IP
    debug=True                            # Enable verbose output
)
```

## Setting Up Tor

On Debian/Ubuntu:

```bash
sudo apt install tor
sudo systemctl start tor
sudo systemctl enable tor
```

Edit the Tor configuration file:

```bash
sudo nano /etc/tor/torrc
```

Add these lines:

```
ControlPort 9051
HashedControlPassword 16:01234567890ABCDEF...
```

To generate a hashed password:

```bash
tor --hash-password "your_password"
```

Restart Tor:

```bash
sudo systemctl restart tor
```

## API Reference

### Main Functions

- `configure()` - Set up the TorRotate library
- `requests` - Drop-in replacement for the requests library
- `force_new_ip()` - Force rotation to a new IP address
- `get_current_ip()` - Get the current external IP address
- `reset_rotation_counter()` - Reset the request counter
- `rotate_ip()` - Rotate to a new Tor circuit
- `configure_tor()` - Interactive Tor configuration helper