Skip to main content

Add crawling capability to pydantic ai agent

Project description

pydantic-ai-crawling

Seamlessly integrate Pydantic AI with Crawl4AI to empower your AI agents with advanced web crawling and scraping capabilities.

Features

  • 🔎 Crawling & Scraping: High-performance web content extraction tailored for AI agents.
  • 🖼️ Media Support: Extract images, audio, videos, and responsive formats (srcset, picture).
  • 🚀 Dynamic Crawling: Execute JavaScript and handle async/sync content extraction.
  • 📸 Screenshots: Capture page screenshots for debugging or visual analysis.
  • 📂 Raw Data Crawling: Process raw HTML (raw:) or local files (file://) directly.
  • 🔗 Link Extraction: Comprehensive extraction of internal, external, and iframe links.
  • 🛠️ Customizable Hooks: Define hooks at every step to customize crawling behavior.
  • 💾 Caching: Built-in caching for improved speed and efficiency.
  • 📄 Metadata Extraction: Retrieve structured metadata from any web page.
  • 📡 IFrame Support: Seamless extraction from embedded iframe content.
  • 🕵️ Lazy Load Handling: Automatically waits for images and content to load.
  • 🔄 Full-Page Scanning: Simulates scrolling for infinite-scroll and dynamic pages.

Installation

pip install pydantic-ai-crawling

Usage

import pydantic_ai_crawling

# Example usage
pydantic_ai_crawling.greet()

CLI

After installation, you can use the built-in CLI:

crawler

Development

To set up the development environment:

uv sync

To run tests:

uv run pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydantic_ai_crawlers-0.1.1.tar.gz (346.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydantic_ai_crawlers-0.1.1-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file pydantic_ai_crawlers-0.1.1.tar.gz.

File metadata

  • Download URL: pydantic_ai_crawlers-0.1.1.tar.gz
  • Upload date:
  • Size: 346.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pydantic_ai_crawlers-0.1.1.tar.gz
Algorithm Hash digest
SHA256 10895ce4d0ebba51ecf277bb980cf1177d99b26510984f362cfd9b296709eef0
MD5 14e2143b60129b6611ef542132ea887e
BLAKE2b-256 7275df69bf79ee932e026dbd1da0c13de5564f22e6eb353af8f95b5a31a6a98f

See more details on using hashes here.

File details

Details for the file pydantic_ai_crawlers-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pydantic_ai_crawlers-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pydantic_ai_crawlers-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8cf4320da9e7c37538821875d2a734b698ac52f53f35211dab1748c9546f8ed
MD5 51e60eae93e303fe6cba2a03a6e78e86
BLAKE2b-256 276664331d05f405d31c34f5e29cf152a349e6bf78ec4ebb47999184eafb95c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page