patchtroy 0.4.6__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. {patchtroy-0.4.6 → patchtroy-0.5.0}/Dockerfile +66 -62
  2. {patchtroy-0.4.6 → patchtroy-0.5.0}/PKG-INFO +1 -1
  3. {patchtroy-0.4.6 → patchtroy-0.5.0}/PRD.md +1 -1
  4. patchtroy-0.5.0/VERSION +1 -0
  5. {patchtroy-0.4.6 → patchtroy-0.5.0}/benchmarks/BENCHMARKS.md +1 -1
  6. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/benchmarks.md +1 -1
  7. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/rest-api.md +1 -1
  8. {patchtroy-0.4.6 → patchtroy-0.5.0}/pyproject.toml +1 -1
  9. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/__init__.py +1 -1
  10. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/cli.py +1 -1
  11. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/server.py +2 -2
  12. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_server.py +1 -1
  13. {patchtroy-0.4.6 → patchtroy-0.5.0}/uv.lock +1 -1
  14. patchtroy-0.4.6/VERSION +0 -1
  15. {patchtroy-0.4.6 → patchtroy-0.5.0}/.dockerignore +0 -0
  16. {patchtroy-0.4.6 → patchtroy-0.5.0}/.gitattributes +0 -0
  17. {patchtroy-0.4.6 → patchtroy-0.5.0}/.githooks/pre-commit +0 -0
  18. {patchtroy-0.4.6 → patchtroy-0.5.0}/.githooks/prepare-commit-msg +0 -0
  19. {patchtroy-0.4.6 → patchtroy-0.5.0}/.githooks/versionlib.sh +0 -0
  20. {patchtroy-0.4.6 → patchtroy-0.5.0}/.github/workflows/ci.yml +0 -0
  21. {patchtroy-0.4.6 → patchtroy-0.5.0}/.github/workflows/docs.yml +0 -0
  22. {patchtroy-0.4.6 → patchtroy-0.5.0}/.github/workflows/release.yml +0 -0
  23. {patchtroy-0.4.6 → patchtroy-0.5.0}/.gitignore +0 -0
  24. {patchtroy-0.4.6 → patchtroy-0.5.0}/LICENSE +0 -0
  25. {patchtroy-0.4.6 → patchtroy-0.5.0}/README.md +0 -0
  26. {patchtroy-0.4.6 → patchtroy-0.5.0}/benchmarks/benchmark_results.json +0 -0
  27. {patchtroy-0.4.6 → patchtroy-0.5.0}/benchmarks/run_benchmark.py +0 -0
  28. {patchtroy-0.4.6 → patchtroy-0.5.0}/docker-compose.yml +0 -0
  29. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/context-pool.md +0 -0
  30. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/getting-started.md +0 -0
  31. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/index.md +0 -0
  32. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/llm-chunking.md +0 -0
  33. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/media-capture.md +0 -0
  34. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/proxy-rotation.md +0 -0
  35. {patchtroy-0.4.6 → patchtroy-0.5.0}/docs/stealth-architecture.md +0 -0
  36. {patchtroy-0.4.6 → patchtroy-0.5.0}/mkdocs.yml +0 -0
  37. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/chunker.py +0 -0
  38. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/crawler.py +0 -0
  39. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/extractors.py +0 -0
  40. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/models.py +0 -0
  41. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/pool.py +0 -0
  42. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/proxy.py +0 -0
  43. {patchtroy-0.4.6 → patchtroy-0.5.0}/src/patchtroy/utils.py +0 -0
  44. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_chunker.py +0 -0
  45. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_cli.py +0 -0
  46. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_crawler.py +0 -0
  47. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_extractors.py +0 -0
  48. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_media_capture.py +0 -0
  49. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_models.py +0 -0
  50. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_pool.py +0 -0
  51. {patchtroy-0.4.6 → patchtroy-0.5.0}/tests/test_proxy.py +0 -0
@@ -1,62 +1,66 @@
1
- # ==============================================================================
2
- # Patchtroy Production Dockerfile
3
- # Undetected stealth web scraper & markdown extractor microservice for LLMs
4
- # ==============================================================================
5
-
6
- FROM python:3.11-slim
7
-
8
- LABEL maintainer="Marcus Zou <marcus.zou@icloud.com>"
9
- LABEL org.opencontainers.image.title="Patchtroy"
10
- LABEL org.opencontainers.image.description="Undetected stealth web scraper & markdown extractor microservice"
11
- LABEL org.opencontainers.image.version="0.4.6"
12
-
13
- # Python and environment settings
14
- ENV PYTHONUNBUFFERED=1 \
15
- PYTHONDONTWRITEBYTECODE=1 \
16
- PIP_NO_CACHE_DIR=1 \
17
- PATCHRIGHT_BROWSERS_PATH=/ms-playwright
18
-
19
- # Install minimal OS dependencies for headless Chromium
20
- RUN apt-get update && apt-get install -y --no-install-recommends \
21
- curl \
22
- ca-certificates \
23
- libnss3 \
24
- libnspr4 \
25
- libatk1.0-0 \
26
- libatk-bridge2.0-0 \
27
- libcups2 \
28
- libdrm2 \
29
- libxkbcommon0 \
30
- libxcomposite1 \
31
- libxdamage1 \
32
- libxfixes3 \
33
- libxrandr2 \
34
- libgbm1 \
35
- libpango-1.0-0 \
36
- libcairo2 \
37
- libasound2 \
38
- && rm -rf /var/lib/apt/lists/*
39
-
40
- WORKDIR /app
41
-
42
- # Copy dependency definition and source code
43
- COPY pyproject.toml README.md /app/
44
- COPY src/ /app/src/
45
-
46
- # Install patchtroy with REST microservice extras and download Chromium
47
- RUN pip install --no-cache-dir ".[server]" \
48
- && patchright install chromium
49
-
50
- # Create unprivileged user
51
- RUN useradd -m -u 1000 patchtroy \
52
- && chown -R patchtroy:patchtroy /app /ms-playwright
53
-
54
- USER patchtroy
55
-
56
- EXPOSE 4013
57
-
58
- HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
59
- CMD curl -f http://localhost:4013/health || exit 1
60
-
61
- ENTRYPOINT ["patchtroy"]
62
- CMD ["--serve", "--host", "0.0.0.0", "--port", "4013"]
1
+ # ==============================================================================
2
+ # Patchtroy Production Dockerfile
3
+ # Undetected stealth web scraper & markdown extractor microservice for LLMs
4
+ # ==============================================================================
5
+
6
+ FROM python:3.11-slim
7
+
8
+ LABEL maintainer="Marcus Zou <marcus.zou@icloud.com>"
9
+ LABEL org.opencontainers.image.title="Patchtroy"
10
+ LABEL org.opencontainers.image.description="Undetected stealth web scraper & markdown extractor microservice"
11
+ LABEL org.opencontainers.image.version="0.5.0"
12
+
13
+ # Python and environment settings
14
+ ENV PYTHONUNBUFFERED=1 \
15
+ PYTHONDONTWRITEBYTECODE=1 \
16
+ PIP_NO_CACHE_DIR=1 \
17
+ PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \
18
+ PATCHRIGHT_BROWSERS_PATH=/ms-playwright
19
+
20
+ # Install minimal OS dependencies for headless Chromium
21
+ RUN apt-get update && apt-get install -y --no-install-recommends \
22
+ curl \
23
+ ca-certificates \
24
+ libnss3 \
25
+ libnspr4 \
26
+ libatk1.0-0 \
27
+ libatk-bridge2.0-0 \
28
+ libcups2 \
29
+ libdrm2 \
30
+ libxkbcommon0 \
31
+ libxcomposite1 \
32
+ libxdamage1 \
33
+ libxfixes3 \
34
+ libxrandr2 \
35
+ libgbm1 \
36
+ libpango-1.0-0 \
37
+ libcairo2 \
38
+ libasound2 \
39
+ && rm -rf /var/lib/apt/lists/*
40
+
41
+ # Create unprivileged user and ensure browser directories exist
42
+ RUN useradd -m -u 1000 patchtroy \
43
+ && mkdir -p /ms-playwright /app /home/patchtroy/.cache \
44
+ && ln -s /ms-playwright /home/patchtroy/.cache/ms-playwright \
45
+ && chown -R patchtroy:patchtroy /ms-playwright /app /home/patchtroy
46
+
47
+ WORKDIR /app
48
+
49
+ # Copy dependency definition and source code
50
+ COPY pyproject.toml README.md /app/
51
+ COPY src/ /app/src/
52
+
53
+ # Install patchtroy with REST microservice extras and download Chromium
54
+ RUN pip install --no-cache-dir ".[server]" \
55
+ && patchright install chromium \
56
+ && chown -R patchtroy:patchtroy /app /ms-playwright
57
+
58
+ USER patchtroy
59
+
60
+ EXPOSE 4013
61
+
62
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
63
+ CMD curl -f http://localhost:4013/health || exit 1
64
+
65
+ ENTRYPOINT ["patchtroy"]
66
+ CMD ["serve", "--host", "0.0.0.0", "--port", "4013"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: patchtroy
3
- Version: 0.4.6
3
+ Version: 0.5.0
4
4
  Summary: Undetected stealth web scraper & markdown extractor for LLMs, pairing Patchright with Trafilatura.
5
5
  Project-URL: Homepage, https://github.com/marcuz-apl/patchtroy
6
6
  Project-URL: Repository, https://github.com/marcuz-apl/patchtroy
@@ -152,7 +152,7 @@ Patchtroy occupies the unoccupied **"Lightweight Stealth Sweet Spot"**:
152
152
  - [x] Token counter & LLM chunking utility (`result.chunk(max_tokens=2048)`).
153
153
  - [x] Full test suite (32 tests passing).
154
154
 
155
- ### Phase 4 (v0.4.6 — Current)
155
+ ### Phase 4 (v0.5.0 — Current)
156
156
  - [x] PyPI public release workflows & multi-OS matrix CI (`.github/workflows/`).
157
157
  - [x] Comprehensive benchmark publication vs Crawl4AI and Firecrawl (`benchmarks/BENCHMARKS.md`).
158
158
  - [x] Official documentation portal (Material for MkDocs).
@@ -0,0 +1 @@
1
+ v0.5.0-2609031
@@ -19,7 +19,7 @@ Existing open-source solutions force developers to choose between:
19
19
 
20
20
  ## 2. Feature & Architecture Matrix
21
21
 
22
- | Dimension | **Patchtroy** (v0.4.6) | **Crawl4AI** (v0.9.3) | **Firecrawl** (Self-Hosted) |
22
+ | Dimension | **Patchtroy** (v0.5.0) | **Crawl4AI** (v0.9.3) | **Firecrawl** (Self-Hosted) |
23
23
  | :--- | :---: | :---: | :---: |
24
24
  | **Stealth Engine** | **✅ Native Patchright (C++ CDP masked)** | ❌ Standard Playwright (CDP leaked) | ⚠️ Standard Playwright / Puppeteer |
25
25
  | **Dynamic Challenge Resilience** | **✅ Native driver protection** | ❌ Frequently flagged on automated checks | ❌ Blocked unless using paid SaaS proxy |
@@ -1,6 +1,6 @@
1
1
  # 📊 Benchmarks vs Crawl4AI and Firecrawl
2
2
 
3
- A quantitative, reproducible benchmark comparing **Patchtroy (v0.4.6)** against **Crawl4AI (v0.9.3)** and **Firecrawl (Self-Hosted)**.
3
+ A quantitative, reproducible benchmark comparing **Patchtroy (v0.5.0)** against **Crawl4AI (v0.9.3)** and **Firecrawl (Self-Hosted)**.
4
4
 
5
5
  ---
6
6
 
@@ -53,7 +53,7 @@ curl http://localhost:4013/health
53
53
  ```json
54
54
  {
55
55
  "status": "healthy",
56
- "version": "0.4.6",
56
+ "version": "0.5.0",
57
57
  "engine": "patchright",
58
58
  "active": true
59
59
  }
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "patchtroy"
7
- version = "0.4.6"
7
+ version = "0.5.0"
8
8
  description = "Undetected stealth web scraper & markdown extractor for LLMs, pairing Patchright with Trafilatura."
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -6,7 +6,7 @@ from patchtroy.models import LinkItem, PatchtroyConfig, ScrapeResult
6
6
  from patchtroy.pool import BrowserContextPool
7
7
  from patchtroy.proxy import ProxyItem, ProxyManager
8
8
 
9
- __version__ = "0.4.6"
9
+ __version__ = "0.5.0"
10
10
  __author__ = "Marcus Zou"
11
11
  __license__ = "Apache-2.0"
12
12
  __copyright__ = "Copyright 2026 Alfazen Inc."
@@ -11,7 +11,7 @@ from patchtroy.crawler import Patchtroy
11
11
  from patchtroy.models import PatchtroyConfig
12
12
  from patchtroy.utils import silence_windows_proactor_bug
13
13
 
14
- __version__ = "0.4.6"
14
+ __version__ = "0.5.0"
15
15
 
16
16
 
17
17
  def main(argv: list[str] | None = None) -> int:
@@ -90,7 +90,7 @@ def create_app() -> FastAPI:
90
90
  app = FastAPI(
91
91
  title="Patchtroy REST Microservice",
92
92
  description="Undetected stealth web scraper & clean Markdown extractor for LLMs.",
93
- version="0.4.6",
93
+ version="0.5.0",
94
94
  lifespan=lifespan,
95
95
  )
96
96
 
@@ -99,7 +99,7 @@ def create_app() -> FastAPI:
99
99
  """Microservice health and status check."""
100
100
  return {
101
101
  "status": "healthy",
102
- "version": "0.4.6",
102
+ "version": "0.5.0",
103
103
  "engine": "patchright",
104
104
  "active": crawler_instance is not None and crawler_instance._pool.is_running,
105
105
  }
@@ -17,7 +17,7 @@ async def test_health_check_endpoint():
17
17
  assert resp.status_code == 200
18
18
  data = resp.json()
19
19
  assert data["status"] == "healthy"
20
- assert data["version"] == "0.4.6"
20
+ assert data["version"] == "0.5.0"
21
21
  assert data["engine"] == "patchright"
22
22
 
23
23
 
@@ -900,7 +900,7 @@ wheels = [
900
900
 
901
901
  [[package]]
902
902
  name = "patchtroy"
903
- version = "0.4.6"
903
+ version = "0.5.0"
904
904
  source = { editable = "." }
905
905
  dependencies = [
906
906
  { name = "beautifulsoup4" },
patchtroy-0.4.6/VERSION DELETED
@@ -1 +0,0 @@
1
- v0.4.7-260902d
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes