Skills & Capabilities
Skill 1: Modern Project Setup (uv-based project construction)
Goal: Create a modern Python project with environment isolation and clear dependencies. Actionable Steps:
- •Initialization: Use
uv initto initialize the project structure and generatepyproject.toml. - •Dependency Management: Use
uv add fastapi uvicorn[standard] aiohttp apscheduler redis pydantic-settings loguruto add core dependencies. - •Development Environment: Configure
.python-versionto lock the Python version, ensuring consistency in team collaboration.
Skill 2: Core Logic Implementation (Collection & Intelligent Scoring)
Goal: Establish a dynamic proxy pool maintenance mechanism based on scores. Actionable Steps:
- •Asynchronous Fetcher: Define
BaseFetcherand implement multi-source asynchronous crawling. - •Weighted Scoring System:
- •Initial Score: 10
- •Successful Verification: +10 (max 100)
- •Failed Verification: -20 (min 0, delete if it reaches 0)
- •Purpose: Only extremely stable proxies are retained long-term.
- •Concurrent Verification: Use
asyncio.Semaphoreto limit the number of concurrent verifications (e.g., 200) to prevent crashing your own machine or getting banned by target websites.
Skill 3: UX-First API Implementation (User Experience First Interfaces)
Goal: Create a flexible and easy-to-integrate proxy acquisition interface. Actionable Steps:
- •Smart Polling Strategy (
GET /get):- •Logic: Prioritize returning the highest-scoring (100 points) proxies. Within the highest score bracket, use Random or Round-Robin strategies to avoid multiple people getting the same IP in a short period.
- •Parameter Filtering (Query Params):
- •
type:http|https(fetch as needed) - •
anonymous:true|false(whether it is highly anonymous)
- •
- •Multi-format Response:
- •
format=json(default): Returns detailed info{"ip": "...", "port": 8080, "score": 100, "source": "..."}. - •
format=text: Only returns theip:portstring. Convenient for users to call directly in scripts:proxies={"http": requests.get("...").text}.
- •
- •Health Dashboard (
GET /stats):- •Returns total pool count, percentage of high-scoring proxies, and the time of the last check.
- •Friendly Error Handling:
- •When the pool is empty, return HTTP 503 Service Unavailable with a clear JSON message
{"msg": "Pool is empty, refreshing..."}, instead of letting the client time out.
- •When the pool is empty, return HTTP 503 Service Unavailable with a clear JSON message
Skill 4: Documentation & Developer Experience (Docs & DX)
Goal: Let users get the project running within one minute. Actionable Steps:
- •README Structure Optimization:
- •Badge: Prominently display the
Built with uvbadge. - •Quick Start:
bash
# Minimalist startup git clone ... uv sync uv run main.py
- •API Documentation: Showcase screenshots of the Swagger UI (
/docs) to intuitively demonstrate ease of use.
- •Badge: Prominently display the
- •Development Guide: Explain how to add new dependencies via
uv addand how to write custom Fetcher extensions.