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

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.4
File Size Uploaded Provenance Actions
hadoku_scrape_sdk-0.1.4.tar.gz 104.2 kB With provenance Details for hadoku_scrape_sdk-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 226.1 kB

Release files / hadoku_scrape_sdk-0.1.4.tar.gz

Download URL hadoku_scrape_sdk-0.1.4.tar.gz
Size 104.2 kB
Tags Source
SHA-256 checksum
How to use checksums
afaea323d7d50babe992397fc5664c45154e4878b607b9de8d7a1176de9c5dc8
BLAKE2b-256 checksum
How to use checksums
c0ce309ee5762d852e899c783e526eb023fb356c091c2cf01de515dc1160cd82
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 6, 2026.

Transparency log

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

Download URL hadoku_scrape_sdk-0.1.4-py3-none-any.whl
Size 121.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08a050a264d83ed276879cc5c9a340b35ebce91e1a58228c590be74cb617d8dd
BLAKE2b-256 checksum
How to use checksums
ac53af2e835d7563985071a58a910cdc8108e5eac9e9a1b3f6f04d5a399bba45
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 6, 2026.

Transparency log

Security for hadoku-scrape-sdk 0.1.4

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