Skip to main content

hadoku-scrape-sdk

The runtime that hadoku-scrape plugins are built on. A plugin is a scraper that lives in its own repo and runs inside the hadoku-scrape service. This package is everything such a plugin imports, and nothing of the service around it.

pip install hadoku-scrape-sdk            # runtime
pip install 'hadoku-scrape-sdk[testing]' # + the pinned test stack and test floor

What's in it

Module What it gives a plugin
hadoku_sdk.plugins ScraperPlugin, UrlScraper: the contract. python -m hadoku_sdk.plugins checks every enabled plugin loads
hadoku_sdk.db.engine, .db.execution_log The SQLite engine (init_db, get_connection) and execution_run, the run log every scrape writes through
hadoku_sdk.runtime Severity and events (ctx.event(...)), run pacing, the run gate
hadoku_sdk.preflight PreflightResult, Preflightable, host_desktop_available, host_desktop_env: the preflight contract and "is a person at this desktop", standard library only, so a package that must not load a browser stack can use them. The hadoku_sdk.browser paths return the same objects
hadoku_sdk.browser Browser manager (Patchright, persistent profiles, stealth), sessions, preflight checks
hadoku_sdk.proxy HTTP client with proxy escalation
hadoku_sdk.auth.cookies Browser-cookie import
hadoku_sdk.api.middleware Auth dependencies (require_service, ...), error types, spawn_tracked for fire-and-forget routes
hadoku_sdk.scrapers.base BaseScraper, ScraperResult for URL-dispatch scrapers
hadoku_sdk.observability.logging get_logger (structlog)
hadoku_sdk.testing The autouse test floor: an isolated DB per test, no real browsers

A plugin

# my_plugins/thing/plugin.py
from pathlib import Path
from hadoku_sdk.plugins import ScraperPlugin

PLUGIN = ScraperPlugin(
    name="thing",
    routers=[router],                 # FastAPI, prefix /api/v1/<yours>
    cli={"thing": thing_app},         # Typer, mounted as `hs thing`
    migrations=Path(__file__).parent / "migrations",   # NNN_*.sql
    on_startup=[seed],
)
# pyproject.toml
[project.entry-points."hadoku_scrape.plugins"]
thing = "my_plugins.thing.plugin:PLUGIN"

The host's plugins.toml decides which installed plugins actually load.

Tests

# tests/conftest.py
import os
from pathlib import Path
os.environ["HADOKU_PLUGINS_MANIFEST"] = str(Path(__file__).parent / "resources" / "plugins.toml")
pytest_plugins = ["hadoku_sdk.testing.pytest_plugin"]
# tests/unit/conftest.py
from hadoku_sdk.testing.unit import _instant_sleep, _silence_discord_notify  # noqa: F401

Rules a plugin follows

  • Notifications go through ctx.event(name, payload, severity=...) on the run context, never a direct Discord call. The host routes them.
  • Timestamps are UTC. Never datetime.utcnow().
  • Never log credentials, cookies or API keys.
  • No lazy imports inside functions that run on background threads.
  • Drive browsers through hadoku_sdk.browser.manager. Never hardcode locale or timezone.

License: ISC.

Metadata

Release files for hadoku-scrape-sdk 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hadoku-scrape-sdk 0.1.6
File Size Uploaded Provenance Actions
hadoku_scrape_sdk-0.1.6.tar.gz 106.3 kB With provenance Details for hadoku_scrape_sdk-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hadoku-scrape-sdk 0.1.6
File Interpreter ABI Platform Actions
hadoku_scrape_sdk-0.1.6-py3-none-any.whl Python 3 none any Details for hadoku_scrape_sdk-0.1.6-py3-none-any.whl

Total release size: 230.8 kB

Release files / hadoku_scrape_sdk-0.1.6.tar.gz

Download URL hadoku_scrape_sdk-0.1.6.tar.gz
Size 106.3 kB
Tags Source
SHA-256 checksum
How to use checksums
343fd8bdef2cdc3edd7d0073ef32151d820cc5784c47f6e18d6c38f51d3746fd
BLAKE2b-256 checksum
How to use checksums
79776b01b76f40fee7a427e2dce8ef284c254de5b98a7e07e386e88c36d82711
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / hadoku_scrape_sdk-0.1.6-py3-none-any.whl

Download URL hadoku_scrape_sdk-0.1.6-py3-none-any.whl
Size 124.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8b24892d9d017af002d63a7066f894873ae7d3aef606e92ac6c8a8898f9b1fb
BLAKE2b-256 checksum
How to use checksums
43d9760f1a65b41539f4b475e22a9b633f45cc9e0130c3472580a25664e51302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for hadoku-scrape-sdk 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hadoku_scrape_sdk-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page