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

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.3
File Size Uploaded Provenance Actions
hadoku_scrape_sdk-0.1.3.tar.gz 101.6 kB With provenance Details for hadoku_scrape_sdk-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 220.2 kB

Release files / hadoku_scrape_sdk-0.1.3.tar.gz

Download URL hadoku_scrape_sdk-0.1.3.tar.gz
Size 101.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a3e94428921429b11c55a3f3bbea1d9bb9fe2fc9586e6b47463bc842917fbcda
BLAKE2b-256 checksum
How to use checksums
489034d4961c240aaefba29b7ff144017b21a661e01440924d2549f29d384213
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 4, 2026.

Transparency log

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

Download URL hadoku_scrape_sdk-0.1.3-py3-none-any.whl
Size 118.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3900fc62af5f5f8317268b1f62fcbbe09fc5f22a9ce87f063417197d0cc87df1
BLAKE2b-256 checksum
How to use checksums
9450acdbc9a6dce373aedece969789b02c5ebcef7e917d322763af889f058335
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 4, 2026.

Transparency log

Security for hadoku-scrape-sdk 0.1.3

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.3.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 4, 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