Skip to main content

langchain-brewpage

LangChain tools that publish HTML, Markdown, JSON, key-value stores and files to BrewPage and return a shareable URL. Free, no account, no API key.

PyPI License CI

Install

pip install langchain-brewpage

Usage

from langchain_brewpage import BrewPageToolkit

tools = BrewPageToolkit().get_tools()
page = tools[0].invoke({"content": "# Weekly report\n\nAll green.", "format": "markdown"})
print(page["url"])              # page link, share it
print(page["management_link"])  # private: edits or deletes the page

With an agent (any tool-calling chat model):

from langchain.agents import create_agent
from langchain_brewpage import BrewPageToolkit

agent = create_agent(model, tools=BrewPageToolkit().get_tools())
agent.invoke({"messages": [{"role": "user", "content": "Write a one-page HTML changelog and publish it."}]})

Tools

Tool API Result
brewpage_publish_page (BrewPagePublishPageTool) POST /api/html HTML or Markdown page URL
brewpage_publish_json (BrewPagePublishJsonTool) POST /api/json JSON document URL
brewpage_create_kv_store (BrewPageCreateKvStoreTool) POST /api/kv Key-value store URL, one initial key
brewpage_upload_file (BrewPageUploadFileTool) POST /api/files Download or page URL for a local file

BrewPageToolkit returns all four with one shared client. Every tool also takes ttl_days, password and namespace and returns a dict with url, id, namespace, owner_token, management_link, expires_at. API errors (rate limits, refused content) reach the agent as tool messages, not exceptions.

url is the page link. management_link is the management link with its key (https://brewpage.app/manage/...#k=...): anyone who has it can edit or delete the publication. The tool descriptions tell the agent to give the user both, to keep owner_token for later updates and show it on request, and never to post the management link or the token publicly (public page, repo, shared channel). management_link is None when the API returned an existing publication without a new key.

The first call gets an owner token; the toolkit reuses it, so all publications share one owner. To keep it across runs, pass it in:

from langchain_brewpage import BrewPageClient, BrewPageToolkit

toolkit = BrewPageToolkit(client=BrewPageClient(owner_token="..."))

Environment: BREWPAGE_OWNER_TOKEN, BREWPAGE_NAMESPACE, BREWPAGE_BASE_URL (default https://brewpage.app).

Limits

  • Hosting is temporary: publications expire after 15 days by default, ttl_days 1-30.
  • Without namespace a publication is private: unlisted and not indexed, but anyone with the link can open it. Add password to restrict reads.
  • namespace="public" lists pages in the public gallery and search engines. Never put secrets or personal data there.
  • Size caps: HTML 5 MB, JSON 1 MB, KV value 1 MB, file 5 MB (video 20 MB). Current values: brewpage.app/api/limits.

Development

uv sync --group test
uv run pytest
BREWPAGE_LIVE=1 uv run pytest -m live   # publishes one private page on production

Support

info@brewpage.app or GitHub issues.

License

MIT

Metadata

Release files for langchain-brewpage 0.1.2

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

Source distribution (sdist)

Source distribution for langchain-brewpage 0.1.2
File Size Uploaded Provenance Actions
langchain_brewpage-0.1.2.tar.gz 8.3 kB With provenance Details for langchain_brewpage-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-brewpage 0.1.2
File Interpreter ABI Platform Actions
langchain_brewpage-0.1.2-py3-none-any.whl Python 3 none any Details for langchain_brewpage-0.1.2-py3-none-any.whl

Total release size: 16.3 kB

Release files / langchain_brewpage-0.1.2.tar.gz

Download URL langchain_brewpage-0.1.2.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0ebd5215d43baf058ecb19e128b77dd095150173a1db69f7d955bd14534f9844
BLAKE2b-256 checksum
How to use checksums
093714155c464894db2d2f33e4a4fda1bc1cf8dac0f073981eb40bcddadff9f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / langchain_brewpage-0.1.2-py3-none-any.whl

Download URL langchain_brewpage-0.1.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27be797aa06fe73d307c3fd4567abcceefed8f13e62c991656f1c429ac95b789
BLAKE2b-256 checksum
How to use checksums
1a0477356714f35978f1dbd4404843d0e6ab4c4f400971b5d3ffeadb0b7caa1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for langchain-brewpage 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_brewpage-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

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