Files
ggfevansandClaude 42b15c449a feat: complete packaging system for distribution
Package Configuration:
- Enhanced setup.py with comprehensive metadata and classifiers
- Modern pyproject.toml with build system configuration
- MANIFEST.in for proper file inclusion/exclusion
- Added __main__.py for python -m execution
- py.typed marker for type checking support

Dependencies Management:
- Separated development dependencies in requirements-dev.txt
- Core dependencies with version constraints
- Optional dependencies for docs and development
- Build tools configuration

Installation and Distribution:
- Console script entry points (qbit-torrent-extract, qte)
- Proper package structure with src layout
- Wheel and source distribution support
- PyPI-ready metadata and classifiers

Container Support:
- Multi-stage Dockerfile for production deployment
- qBittorrent integration Dockerfile
- Docker Compose configurations
- .dockerignore for optimized builds

Release Documentation:
- Comprehensive CHANGELOG.md with version history
- Docker integration documentation
- Build and installation instructions

Successfully builds:
- qbit_torrent_extract-0.1.0-py3-none-any.whl
- qbit_torrent_extract-0.1.0.tar.gz

Package is now ready for PyPI distribution and Docker deployment\!

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-06 23:56:59 -07:00

90 lines
2.1 KiB
YAML

version: '3.8'
services:
qbit-torrent-extract:
build: .
image: qbit-torrent-extract:latest
container_name: qbit-torrent-extract
restart: unless-stopped
# Run extraction on a schedule (every 5 minutes)
command: |
sh -c 'while true; do
echo "Running extraction at $$(date)"
python -m qbit_torrent_extract /data --config /config/config.json --show-stats
echo "Sleeping for 5 minutes..."
sleep 300
done'
volumes:
# Configuration directory
- ./config:/config
# Logs directory
- ./logs:/logs
# Data directory (mount your download directory here)
- ${DOWNLOAD_DIR:-/path/to/downloads}:/data
# Optional: Statistics file
- ./stats:/stats
environment:
# Override log level if needed
- QBIT_EXTRACT_LOG_LEVEL=${LOG_LEVEL:-INFO}
# Set timezone
- TZ=${TZ:-UTC}
# Python settings
- PYTHONUNBUFFERED=1
# Resource limits
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Optional: Run alongside qBittorrent
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ:-UTC}
- WEBUI_PORT=8080
volumes:
- ./qbittorrent/config:/config
- ${DOWNLOAD_DIR:-/path/to/downloads}:/downloads
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp
restart: unless-stopped
# Configure to use qbit-torrent-extract
# In qBittorrent settings, set external program to:
# docker exec qbit-torrent-extract python -m qbit_torrent_extract "/data/%N" --torrent-name "%N"
# Networks
networks:
default:
name: media-network
external: false
# Example .env file:
# DOWNLOAD_DIR=/media/downloads
# LOG_LEVEL=INFO
# TZ=America/New_York