Skip to content

API Reference parrot_tools.scraping.registry

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.scraping.registry

View source

PlanRegistry — Async, disk-backed index mapping URLs to saved plan files.

Maintains a registry.json file that maps URL fingerprints to plan file locations. Provides three-tier lookup: exact fingerprint → path-prefix → domain. All write mutations are guarded with asyncio.Lock.

Now implemented as a thin subclass of BasePlanRegistry[ScrapingPlan] — shared registry logic lives in base_registry.py.

Alias BasePlanRegistry

Re-exported from parrot_tools.scraping.base_registry.BasePlanRegistry.

Class PlanRegistry

Async, disk-backed index mapping URLs to saved ScrapingPlan files.

Thin subclass of BasePlanRegistry specialised for ScrapingPlan objects. Overrides register to use the ScrapingPlan's own created_at and tags fields.

Parameter Type Default Description
plans_dir Optional[Path] None Directory where plan files and registry.json are stored. Defaults to scraping_plans in the current working directory.

Method PlanRegistry.register

Register a ScrapingPlan in the index and persist to disk.

Overrides the base implementation to use plan.created_at and plan.tags directly from the ScrapingPlan model.

register(plan: ScrapingPlan, relative_path: str) -> None

Parameter Type Default Description
plan ScrapingPlan The ScrapingPlan to register.
relative_path str Path to the plan file relative to plans_dir.

Alias PlanRegistryEntry

Re-exported from parrot_tools.scraping.plan.PlanRegistryEntry.

Alias ScrapingPlan

Re-exported from parrot_tools.scraping.plan.ScrapingPlan.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally