BrowseFn Python SDK
Comprehensive self-hosted web browsing and data extraction platform for developers.
The Python SDK for BrowseFn provides a unified interface for:
- Web scraping and crawling (HTML, Markdown, Text)
- Image search and download
- Geolocation services (Geocoding, Reverse Geocoding)
- Provider-agnostic interface (swap providers easily)
Status
🚧 Alpha
Features
- Type-safe: Built with Pydantic for robust data validation.
- Async: Fully asynchronous API using
httpx. - Extensible: Easy to add custom providers.
- Batteries included: Comes with basic providers (BeautifulSoup).
Installation
pip install browsefn
Usage
Web Scraping
import asyncio
from browsefn import browse_fn
from browsefn.web.providers.bs4 import BeautifulSoupProvider
async def main():
# Initialize
browse = browse_fn()
# Register a provider (e.g., BeautifulSoup)
bs4_provider = BeautifulSoupProvider()
browse.web.register_provider("beautifulsoup", bs4_provider)
browse.web.config.default_provider = "beautifulsoup"
# Get a page
page = await browse.web.get_page("https://example.com")
print(f"Title: {page.metadata.title}")
print(f"Content length: {len(page.content)}")
if __name__ == "__main__":
asyncio.run(main())
Configuration
You can configure BrowseFn using the BrowseFnConfig object.
from browsefn import browse_fn, BrowseFnConfig, WebConfig
config = BrowseFnConfig(
web=WebConfig(
default_provider="firecrawl",
# ...
)
)
browse = browse_fn(config)
Development
-
Install dependencies:
pip install -e ".[test]"
-
Run tests:
pytest
Metadata
Release files for browsefn 0.0.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 | Provenance | Actions |
|---|---|---|---|---|
| browsefn-0.0.1.tar.gz | 27.4 kB | Without provenance | Details for browsefn-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| browsefn-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for browsefn-0.0.1-py3-none-any.whl |
Total release size: 64.7 kB
Release files / browsefn-0.0.1.tar.gz
| Download URL | browsefn-0.0.1.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e32c7f3243fd92b4cce5b59eec4d56ad94c2f37040c49678c8a1bf5811133198
|
|
BLAKE2b-256 checksum How to use checksums |
91366c84f16893352c67e1ed27d4bdb6bd7729b86208016790faab82a5ec4dca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / browsefn-0.0.1-py3-none-any.whl
| Download URL | browsefn-0.0.1-py3-none-any.whl |
|---|---|
| Size | 37.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de9f9793025848110eda5a047b874376a84e2b36641b22adc67ff780d2ff57fa
|
|
BLAKE2b-256 checksum How to use checksums |
6bd5f90434cb75dc149c9feccedcc804aee77f172ca6a7b5ed3f37ea8a626062
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for browsefn 0.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.