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.10

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.10
File Size Uploaded Provenance Actions
hadoku_scrape_sdk-0.1.10.tar.gz 110.6 kB With provenance Details for hadoku_scrape_sdk-0.1.10.tar.gz

Built distribution (wheel)

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

Total release size: 239.8 kB

Release files / hadoku_scrape_sdk-0.1.10.tar.gz

Download URL hadoku_scrape_sdk-0.1.10.tar.gz
Size 110.6 kB
Tags Source
SHA-256 checksum
How to use checksums
21619dae8a0428d762edc1f2f7c2c84d0f962b3578875176dd74bb51b7898b6c
BLAKE2b-256 checksum
How to use checksums
5755673dcd57730c65b7cb9b6f271f0047833ad2127c47f8518f369bec0d5d07
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 12, 2026.

Transparency log

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

Download URL hadoku_scrape_sdk-0.1.10-py3-none-any.whl
Size 129.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08fe7c37906b630486be38ff3b9d0f95447abea10fb6e221d52ec6cd5c628ea6
BLAKE2b-256 checksum
How to use checksums
06ce442723b6400ab2c2c9faa246578a91472c683113cc6460f4b8bf24f6c3eb
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 12, 2026.

Transparency log

Security for hadoku-scrape-sdk 0.1.10

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.10.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 12, 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