Skip to main content

Web interface for yap torrent

Project description

YAP Torrent Web Interface Plugin

A web interface plugin for YAP Torrent built with aiohttp.

Features

  • Web server using aiohttp
  • Web dashboard with status and torrent information
  • Selectable torrent list with click-to-select functionality
  • Torrent control actions (start, stop, invalidate, remove, DHT peer discovery)
  • RESTful API endpoints
  • Auto-refresh functionality
  • Separate HTML/CSS/JS files for easy customization

Installation

pip install yap_torrent_web

Usage

The plugin starts automatically when loaded. By default, it runs on http://0.0.0.0:8080.

Access the web interface at: http://localhost:8080

Web Interface

Status Section

  • Displays current status: peer ID, IP, external IP
  • Refresh button to update status

Torrents Section

  • Click on any torrent to select it
  • Control buttons apply to the selected torrent:
    • Start – Start the selected torrent
    • Stop – Stop the selected torrent
    • Invalidate – Invalidate torrent data
    • Remove – Remove the selected torrent
    • DHT Ask Peers – Request peers via DHT

API Endpoints

GET Endpoints

  • GET / - Web dashboard (HTML interface)
  • GET /api/status - Get current status (JSON)
  • GET /api/torrents - Get list of torrents (JSON)
  • GET /static/* - Static files (CSS, JS)

POST Endpoints

  • POST /api/torrent/action - Execute torrent action
    • Body: {"action": "start|stop|invalidate|remove|dht_ask_peers", "hash": "torrent_hash"}
    • Returns: {"success": true, "action": "...", "hash": "..."}

Configuration

The server host and port can be configured by modifying the WebServer initialization in __init__.py:

self.server = WebServer(env, host='0.0.0.0', port=8080)

File Structure

plugins/web_interface/
├── src/yap_torrent_web_interface/
│   ├── __init__.py          # Plugin initialization
│   ├── server.py            # Web server implementation
│   └── static/              # Static web files
│       ├── index.html       # Main HTML page
│       ├── style.css        # Styles
│       └── app.js           # JavaScript logic
├── pyproject.toml
├── README.md
└── LICENSE

Dependencies

  • aiohttp - HTTP server and client library
  • yap_torrent - Core torrent functionality

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yap_torrent_web-0.0.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yap_torrent_web-0.0.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file yap_torrent_web-0.0.1.tar.gz.

File metadata

  • Download URL: yap_torrent_web-0.0.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for yap_torrent_web-0.0.1.tar.gz
Algorithm Hash digest
SHA256 968b26500d058c4714228d64ee1e4e804e9c76f76f9bb5f3c11bb28dd77f8e34
MD5 9dd617851efffe52f6f7f0c3c04e125e
BLAKE2b-256 14abf5e181e87da094a8f3710e0fa2985eb3ff109164684f461ce2a2b67eb0ab

See more details on using hashes here.

File details

Details for the file yap_torrent_web-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for yap_torrent_web-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 702e991123771eec544cef4a4797eb935de3d7cf42bcb131c8000264a127c406
MD5 c672d63570d8b8565fd9e4818d7306ab
BLAKE2b-256 c8609bef661f79675d4fd055ab57454b54129e8ef6c77c15a4d26987daa4d03f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page