mudfish
Python bindings for Mudfish Crawler, a Rust-native web crawling and intelligence engine.
This package wraps the Rust crawl engine directly (via PyO3) — there is no subprocess or network hop to a separate server. It exposes a typed, Pythonic API over the engine; the Rust project itself is at an early stage (see the main repo's ROADMAP_HONEST.md for full status).
Install
pip install mudfish
Usage
import mudfish
result = mudfish.crawl("https://example.com", depth=2, concurrency=30)
print(result.stats.urls_fetched, result.stats.duration_secs)
for page in result: # CrawlResult is iterable over its pages
print(page.status_code, page.url, page.title)
crawl() blocks until the crawl finishes (or hits max_urls / max_duration_secs) and returns a typed CrawlResult:
| Object | Fields |
|---|---|
CrawlResult |
crawl_id, pages: list[Page], errors: list[CrawlError], stats: CrawlStats — iterable over pages, len() is the page count, plus ok_pages |
Page |
url, final_url, status_code, content_type, depth, metadata: PageMetadata, links: list[Link], body_bytes, fetched_via: FetchMethod — helpers title, is_ok |
PageMetadata |
title, meta_description, canonical |
Link |
url, anchor_text, rel |
CrawlError |
url, message |
CrawlStats |
urls_discovered, urls_fetched, urls_skipped, errors, bytes_downloaded, duration_ms — helpers duration_secs, throughput_per_sec |
FetchMethod |
FetchMethod.HTTP ("Http") / FetchMethod.BROWSER ("Browser") |
Every typed object also supports the raw engine dict shape (result["stats"], page["status_code"], page.to_dict()), so code written against earlier versions keeps working. If you only want the raw dict, use mudfish.crawl_dict(...).
Async
crawl_async() runs the blocking engine on a worker thread, so it composes with asyncio and several crawls can run concurrently:
import asyncio
import mudfish
async def main() -> None:
results = await asyncio.gather(
mudfish.crawl_async("https://a.example"),
mudfish.crawl_async("https://b.example"),
)
for result in results:
print(result.stats.urls_fetched)
asyncio.run(main())
Reusable configuration
crawler = mudfish.Crawler(depth=1, concurrency=10)
home = crawler.crawl("https://example.com")
blog = await crawler.crawl_async("https://example.com/blog")
Errors
try:
mudfish.crawl("not-a-url")
except mudfish.InvalidURLError: # also a ValueError
...
except mudfish.CrawlFailedError: # also a RuntimeError
...
Everything derives from mudfish.MudfishError.
Options
All keyword-only, matching the CLI's flags (also available as the CrawlOptions dataclass):
| Parameter | Default | Meaning |
|---|---|---|
depth |
3 |
Max link-following depth |
concurrency |
50 |
Max requests in flight, whole crawl |
per_host_concurrency |
4 |
Max requests in flight per host |
same_domain |
True |
Restrict crawl to the seed's resolved domain |
max_urls |
10000 |
Hard cap on URLs fetched |
max_duration_secs |
None |
Optional wall-clock budget |
timeout_secs |
30 |
Per-request timeout |
request_delay_ms |
0 |
Min delay between requests to the same host |
max_response_bytes |
20 MB |
Per-response size cap |
respect_robots |
True |
Honor robots.txt |
allow_private_networks |
False |
Permit loopback/private targets (internal use only) |
render_js |
False |
Re-render JS-dependent pages in headless Chrome (needs Chrome on the host; much slower) |
render_settle_ms |
2000 |
When render_js is on, settle time before capturing a rendered page |
Limitations
- Chrome is not bundled. With
render_js=Truethe engine drives a headless Chrome that must already be installed on the host; if it cannot be launched, the crawl logs a warning and falls back to static HTML. - Single-platform wheels initially. Built and published from the maintainer's machine, not a cross-platform CI matrix yet — check PyPI for which platforms have wheels; others will need a Rust toolchain to build from source.
License
Apache-2.0.
Metadata
Release files for mudfish 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mudfish-0.2.1.tar.gz | 87.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| mudfish-0.2.1-cp39-abi3-win_arm64.whl | CPython 3.9 | abi3 | Windows ARM64 | Details |
| mudfish-0.2.1-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| mudfish-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl | CPython 3.9 | abi3 | Linux musl 1.2+ x86-64 | Details |
| mudfish-0.2.1-cp39-abi3-musllinux_1_2_aarch64.whl | CPython 3.9 | abi3 | Linux musl 1.2+ ARM64 | Details |
| mudfish-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| mudfish-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| mudfish-0.2.1-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| mudfish-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 41.3 MB
Release files / mudfish-0.2.1.tar.gz
| Download URL | mudfish-0.2.1.tar.gz |
|---|---|
| Size | 87.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e59bab07257665bb5917213ec80da041b82bff6dcf0077bc92d5d9db6bb23a8
|
|
BLAKE2b-256 checksum How to use checksums |
3fbdb05edfb6a557743bfdbc7b49396a0de5baf79b9c4eb0d7e67830d8fcc560
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / mudfish-0.2.1-cp39-abi3-win_arm64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-win_arm64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.9 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
1c64d82be8514981b247b709e6d8228e5423e4a196e698f0338ec32bb8df9534
|
|
BLAKE2b-256 checksum How to use checksums |
3046c057d17d2f21415c2008ac0123463bd15b4392c94db2643afd343ef703a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / mudfish-0.2.1-cp39-abi3-win_amd64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 4.9 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
93fd16d4f8405a8aed3b5a770a52ae63c37ae9caaa1b2faf8714742fb79dc479
|
|
BLAKE2b-256 checksum How to use checksums |
747683f032562e749b232566c8dbc37aa85da77b7848ef227f7980907226353e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / mudfish-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
928162c0d32ae3c54cbf5fa39db877b0aee23a9aa22799271ba2a1fe256c14c9
|
|
BLAKE2b-256 checksum How to use checksums |
c4c74732b648ac4f9dca22ff8312c1119b1cd7fc251adde1eaad5719d08c0542
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / mudfish-0.2.1-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4505b26df3735bbd974d022d196ca3f27169749a86c4d62ac48f756636e90531
|
|
BLAKE2b-256 checksum How to use checksums |
bc2a3a24e7e325b40958cbfeece9e37fa92b6d9f1108618265f9f88d9e543bc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / mudfish-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9184468fee371546b510f0e60921936b4a86e458e8253188e7b7c7c895e332f2
|
|
BLAKE2b-256 checksum How to use checksums |
407f92147c9ce89aebdf4360558e53aefcd9f9a45523ae707d631024984d7c46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / mudfish-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
025d7a71e1871ac8d745d009aa616435c26a8c8519fa7ea5bca52d45c5641376
|
|
BLAKE2b-256 checksum How to use checksums |
d3208367e38114a96f72e28339377cc7a27285dc52c9dfb5aca0792fe5ec42d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / mudfish-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.9 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
33073103420ab12b226a896fe21589f86659cfb3c0707c651ca60eafb22c2bf1
|
|
BLAKE2b-256 checksum How to use checksums |
44a6a86f88652fe3cfb23ae536f38a2fdd47fa8ab9a0839766192e6e11fd20bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / mudfish-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | mudfish-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.2 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ce8cfa4678eaa7986ef797513bf3b1beb83c286bed5244ab146a13322a745482
|
|
BLAKE2b-256 checksum How to use checksums |
b141113accb4d25fc45627a83f0a8cde394ebc8003e1941e22f60a1a8beed107
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|