Skip to main content

pi-web-access-py

Web search and URL fetching extension for pi-python.

Python port of pi-web-access.

Install

pip install pi-web-access-py

Configuration

Set one of these environment variables:

  • BRAVE_API_KEY — Brave Search API key
  • TAVILY_API_KEY — Tavily Search API key
  • SEARXNG_URL — SearXNG instance URL

Tools

  • web_search — Search the web for real-time information
  • fetch_url — Fetch and extract text from a URL

What fetch_url will and will not fetch

The URL comes from the model, which may have read it on a page somebody else wrote, so the tool only reaches the public internet:

  • Only http and https URLs, without credentials in them.
  • Loopback, private, link-local (including cloud metadata), carrier-grade-NAT, multicast and reserved addresses are refused however they are spelled (127.1, 2130706433, [::ffff:7f00:1]), and so are localhost, *.local, *.internal and names without a dot. A name that resolves to such an address is refused too.
  • Redirects are followed by hand (at most 5), and every hop is checked the same way.
  • Without a proxy, the name is resolved once and the request goes to the address that was checked. Through a proxy (HTTP(S)_PROXY, ALL_PROXY, the Windows system proxy) the proxy resolves names, so only literal addresses and the local names above can be refused; a public name that the proxy resolves to a private address is not caught.
  • At most 5 MiB of body is read, and the whole call takes at most 30 s. Output is cut at 2000 lines / 50 KB, and the result says so.
  • There is no setting to allow private addresses.

Details: Phase 7 spec, section 5.3.

Metadata

Release files for pi-web-access-py 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pi-web-access-py 0.6.0
File Size Uploaded Provenance Actions
pi_web_access_py-0.6.0.tar.gz 22.0 kB Without provenance Details for pi_web_access_py-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pi-web-access-py 0.6.0
File Interpreter ABI Platform Actions
pi_web_access_py-0.6.0-py3-none-any.whl Python 3 none any Details for pi_web_access_py-0.6.0-py3-none-any.whl

Total release size: 36.5 kB

Release files / pi_web_access_py-0.6.0.tar.gz

Download URL pi_web_access_py-0.6.0.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4b1668a70cbb8fb6e95924147232682ebbd70eeda883a24aa6fd2c7650ec119d
BLAKE2b-256 checksum
How to use checksums
8f9180b106b4b62a20a9668c6e30f791addd156003b6ad2ae2c380bdd485afd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pi_web_access_py-0.6.0-py3-none-any.whl

Download URL pi_web_access_py-0.6.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84f7afb85d729da2a2f30cf3ca71dde6a1ed2108443c6d49bb6af8ee3c1fafdf
BLAKE2b-256 checksum
How to use checksums
0371d5045be09ddd422e0f286cdcf8e821db55a7ffe4fafb9a7c16155cde73a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pi-web-access-py 0.6.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page