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.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hadoku_scrape_sdk-0.1.5.tar.gz | 104.7 kB | With provenance | Details for hadoku_scrape_sdk-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hadoku_scrape_sdk-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for hadoku_scrape_sdk-0.1.5-py3-none-any.whl |
Total release size: 227.1 kB
Release files / hadoku_scrape_sdk-0.1.5.tar.gz
| Download URL | hadoku_scrape_sdk-0.1.5.tar.gz |
|---|---|
| Size | 104.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38e56f7f67b6f805ab77c31787f97f9efb89679af9031be9cd506c5f8a12acea
|
|
BLAKE2b-256 checksum How to use checksums |
2f219c9563a6d40a66b03291c79ae3b0419cc8c13339caa2a120c8128efa92ca
|
| 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 7, 2026.
Transparency logRelease files / hadoku_scrape_sdk-0.1.5-py3-none-any.whl
| Download URL | hadoku_scrape_sdk-0.1.5-py3-none-any.whl |
|---|---|
| Size | 122.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43f830f52c9efdb5d9a7ca85ab2866e1abeee6848ef53bc60230de043332d918
|
|
BLAKE2b-256 checksum How to use checksums |
f4f58b1da5e1cc311f54b2729b23136eb80cca3cf48127f1d13bdf4aef50402b
|
| 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 7, 2026.
Transparency logSecurity for hadoku-scrape-sdk 0.1.5
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.
Attestation for hadoku_scrape_sdk-0.1.5.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 7, 2026.
Transparency logA 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.