Skip to main content

Unofficial PyPI distribution of Pinchana Core maintained by radimbig

Project description

📦 Radimbig Pinchana Core

Radimbig Pinchana Core is an unofficial PyPI distribution of the original Pinchana Core project, maintained by radimbig.

This fork exists to provide an installable package for downstream consumers. It is not an official upstream release by the original Pinchana author.

The Python import name remains pinchana_core.

It provides shared models, storage management, VPN control, and Docker orchestration logic used by both the gateway and the individual scraper modules.


✨ Key Components

1. Models (pinchana_core.models)

Defines the standard Pydantic v2 schemas for requests and responses, ensuring consistent data structures across all modules.

  • ScrapeRequest: Standardizes input URL and options.
  • ScrapeResponse: Uniform output format for media metadata.
  • MediaItem: Represents an individual image or video in a gallery.

2. Storage (pinchana_core.storage)

An intelligent file-based storage system with a Global Media Cache.

  • LRU Eviction: Automatically deletes the oldest media files when the cache exceeds a configurable size (e.g., 10GB).
  • Download Helpers: Concurrent downloading of media with retry logic.
  • Path Resolution: Standardized directory structure for cached media.

3. VPN Controller (pinchana_core.vpn)

Provides an interface to interact with Gluetun.

  • Signal Rotation: Triggers an immediate IP change via the Gluetun API.
  • Health Checks: Monitors the status of the VPN tunnel.

4. Docker Manager (pinchana_core.docker_manager)

Handles the discovery and lifecycle of scraper modules running in Docker containers.

  • Dynamic Discovery: Reads modules.yaml to identify available scrapers and their route patterns.
  • Lifecycle Control: Can programmatically start, stop, or rebuild scraper containers.

5. Plugin Registry (pinchana_core.plugins)

A lightweight registry for "in-process" plugins, allowing modules to be imported directly into the server for easier development or single-binary deployments.


🛠 Usage

This package is intended to be used as a dependency in Pinchana-based projects that need a PyPI-installable distribution.

Install from PyPI

pip install radimbig-pinchana-core

Import in Python

python -c "import pinchana_core; print(pinchana_core.__all__)"

🚀 Release Flow

This fork is prepared for tag-based PyPI publishing through GitHub Actions.

To publish a new release, the maintainer only needs to:

  1. Add PYPI_API_TOKEN to the GitHub repository secrets.
  2. Create and push a release tag matching the package version, for example v1.0.0.

The GitHub Actions publish workflow will build the package and upload it to PyPI.

Required GitHub Secret

  • PYPI_API_TOKEN: PyPI API token for the radimbig-pinchana-core project.

Upstream Attribution

This repository contains an MIT-licensed fork of the original Pinchana Core project.

  • Original project: https://github.com/Pinchana/pinchana-core
  • Original author and upstream decisions remain with the upstream project
  • This fork only maintains packaging and distribution under the radimbig namespace

📜 License

MIT. See the LICENSE file for details.

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

radimbig_pinchana_core-1.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

radimbig_pinchana_core-1.0.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file radimbig_pinchana_core-1.0.0.tar.gz.

File metadata

  • Download URL: radimbig_pinchana_core-1.0.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for radimbig_pinchana_core-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c1a5c10657fc242fe662fd2b262ad29f755848f9aaaeb75dfc6eee5062565085
MD5 1bd0b00f263c0a07efb9e59dc34b90e4
BLAKE2b-256 ba025207f2fd980bbeceb4883cbe6ca4c67c390d9e0a14265217ddb762727260

See more details on using hashes here.

File details

Details for the file radimbig_pinchana_core-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for radimbig_pinchana_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0df5fac70fc056a4750f26199f7e936421e552e89ba1a6ff78d0ecd4dc82d2a7
MD5 c440024e158b96ee88c48a55ddaf31bd
BLAKE2b-256 89228ccafab549ff9b83468388171ee57ae17c5475f414dbc8023edf0de2b740

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