Official HelpRange API client: upload documents, create tracked share links, run data rooms, e-signature, offers and analytics.
Official Python client and CLI for the HelpRange API: upload documents, create tracked share links, see who viewed what (page by page, link by link), create and run data rooms (folders, NDA, guests, Q&A, request lists), send documents for e-signature, create offers and manage your webhook endpoint.
pip install helprange Quickstart from helprange import HelpRange hr = HelpRange() # reads HELPRANGE_API_KEY; or HelpRange("hr_live_…") # Upload a PDF and create a tracked share link in one call result = hr.share("proposal.pdf", label="ACME - Anna", expires_on="2026-12-31", allow_download=False, watermark=True) print(result["link"]["url"]) # https://www.helprange.com/view/…/proposal.pdf # Who opened it, when and for how long stats = hr.documents.get(result["document"]["id"], recent_views=20) for view in stats["recent_views"]: print(view["viewer"], view["opened_at"], view["seconds_read"]) Async:
import asyncio from helprange import AsyncHelpRange async def main(): async with AsyncHelpRange() as hr: rooms = await hr.data_rooms.list() print([r["name"] for r in rooms["data_rooms"]]) asyncio.run(main()) Authentication Create a team API key in HelpRange → Settings → API keys. It acts as the administrator who created it, limited to its scopes (documents:read, documents:write, links:read, links:write, rooms:read, rooms:write, analytics:read, team:read). Every method's docstring names the scope it needs.
The key is taken from the api_key argument, else HELPRANGE_API_KEY. The SDK sends Authorization: Bearer . The REST API is part of the Max and Unlimited plans, the Deal Room Pass and the trial; other plans get PaymentRequiredError (402).
Keys starting with hr_test_ work on a separate sandbox of your team with sample data – never on live data:
hr = HelpRange("hr_test_…") hr.test_mode # True hr.account.me()["livemode"] # False Resources Attribute What hr.account Who is connected, the plan and its limits hr.folders Folders and subfolders hr.documents Uploads, documents, statistics and share links hr.links Every share link of the team (filters, pagination) and the views of one link hr.triggers Newest views and uploads (polling) hr.data_rooms Create, change and delete data rooms; the index. Sub-resources: .guests, .documents, .folders, .questions, .request_items, .access_requests, .signature_requests hr.ndas The team's NDAs (for a data room's nda_id) and whether the plan has NDAs hr.signature_requests E-signature requests and signed PDFs hr.offers Offers with their own link hr.store Store sales and buyer access hr.lead_forms Lead-magnet / landing-page templates hr.activity The team activity feed hr.webhook_endpoints The team's webhook endpoint: create, change, delete, rotate the secret, test, delivery log, redeliver Path parameters are positional, everything else is a keyword argument named as in the API reference: hr.documents.create_link(250, label="ACME", passcode="oak-41"). Arguments you leave out are not sent. For the few fields where null means something (e.g. subfolder_id=None takes documents out of their subfolder), pass None explicitly. Every method also takes request_options={"timeout": …, "max_retries": …, "headers": {…}}; every POST / PATCH method also takes idempotency_key= (see Retries).
Uploads accept a path, bytes or a binary file object: hr.documents.upload(file="deck.pdf", folder_id=31), or a public URL: hr.documents.upload(file_url="https://example.com/deck.pdf").
Types live in helprange.types (from helprange.types import ShareLink, GetDocumentResponse). For an endpoint this version does not wrap yet: hr.request("GET", "/api/v2/…").
# NDAs need the Max plan (or the Deal Room Pass / trial) nda_available = hr.ndas.list()["nda_available"] room = hr.data_rooms.create( name="Project Falcon", folders=["1. Corporate", "2. Financials", "3. Legal"], settings={"download": False, "watermark": True, "nda": nda_available, "nda_template": "investor", "nda_mode": "click"}, ) print(room["links"]["guest_link"]) # the room's shareable link hr.data_rooms.documents.add(room["id"], document_ids=[250, 251], folder_id=room["folders"][1]["id"]) guest = hr.data_rooms.guests.invite(room["id"], email="jane@example.com") print(guest["link"]) # Jane's own link – also e-mailed to her unless send_invite=False hr.data_rooms.guests.list(room["id"]) hr.data_rooms.guests.remove(room["id"], email="jane@example.com") hr.data_rooms.update(room["id"], settings={"expires_on": "2026-12-31"}) # Deleting a room (and its guest access) needs an explicit confirmation hr.data_rooms.delete(room["id"], confirm=True) Links and views # Every share link of the team – filter by document_id, folder_id, room_id, label, status, created_after/_before page = 1 while page: res = hr.links.list(document_id=250, status="active", page=page, limit=200) for link in res["links"]: print(link["id"], link["label"], link["views"], link["url"]) page = res["next_page"] # Who opened one link, when, for how long for v in hr.links.views(264, limit=100)["views"]: print(v["viewer"], v["opened_at"], v["seconds_read"], v["pages_read"]) Errors Every exception is a helprange.HelpRangeError with status, code (the API's machine-readable reason, when it sends one), message and the parsed body:
from helprange import PermissionDeniedError, RateLimitError try: hr.data_rooms.guests.invite(10, email="jane@example.com") except PermissionDeniedError as e: print("missing scope:", e.required_scope) except RateLimitError as e: print(f"over a limit ({e.code}); retry in {e.retry_after}s") Retries and limits Every POST and PATCH carries an Idempotency-Key header – a new UUID v4 per call, the same one for every retry of that call. The API runs a keyed request once and answers a repeat with the stored response (header Idempotent-Replayed: true), so a retried write never creates a second data room, share link or invitation.
Pass your own key to make a write safe to repeat across processes or restarts (e.g. a job id):
hr.data_rooms.create(name="Project Falcon", idempotency_key=f"deal-{deal.id}-room") # or, on any method: request_options={"idempotency_key": "…"} Keys are kept for 24 hours, per API key. hr.share(..., request_options={"idempotency_key": k}) uses k for the upload and k:link for the share link.
max_retries (default 2) and timeout (default 60 s per attempt) can be set on the client or per request. After each response hr.rate_limit holds limit, remaining, reset and livemode from the response headers. Team limits: 3,600 requests an hour, 120 a minute, 300 writes an hour, 2,000 share links and 1,000 guests a day.
The scheme: HelpRange-Signature: t= ,v1= . ")>. verify_webhook accepts a timestamp within 5 minutes (tolerance= to change it) and any v1 that matches – during the 24 hours after a secret rotation HelpRange sends two. Pass a list of secrets if you rotate on your side. sign_webhook_payload() builds a valid header for your tests. See the webhooks guide.
ep = hr.webhook_endpoints.create(url="https://example.com/webhooks/helprange") print(ep["secret"]) # shown once – store it hr.webhook_endpoints.send_test(ep["id"]) # a test event, delivered right away failed = hr.webhook_endpoints.deliveries(ep["id"], status="failed")["deliveries"] if failed: hr.webhook_endpoints.redeliver(ep["id"], failed[0]["id"]) secret = hr.webhook_endpoints.rotate_secret(ep["id"])["secret"] # the old secret keeps signing for 24 hours hr.webhook_endpoints.update(ep["id"], enabled=True) # turn it back on after 410 Gone / repeated failures hr.webhook_endpoints.delete(ep["id"]) Command line helprange login # prompts for the key, checks it, saves ~/.config/helprange/config (0600) helprange whoami helprange share proposal.pdf --to anna@acme.com --to bob@acme.com --expires 2026-12-31 --no-download --watermark helprange share https://example.com/deck.pdf # a public URL works too helprange documents helprange links # every active share link of the team helprange links --document 250 --status all # filters: --document --folder --room --status --label (+ --page --limit) helprange views --link 264 # who opened link 264, when, how long helprange views 250 # a document's totals and latest views helprange rooms create "Project Falcon" --folder Corporate --folder Financials --nda \ --invite jane@example.com --invite max@example.com # prints the guest link and each guest's own link helprange rooms list helprange rooms show 10 | index 10 | documents 10 | guests 10 | questions 10 --status open helprange rooms add 10 250 251 # add documents 250 and 251 to room 10 helprange rooms invite 10 jane@example.com # HelpRange e-mails the invitation helprange rooms delete 10 --yes # without --yes nothing is deleted --json on any command prints JSON (errors go to stderr as JSON too) – meant for scripts and AI agents. The key: --api-key, else HELPRANGE_API_KEY, else the saved one. helprange logout forgets it. share --to creates one link per recipient, labelled with their e-mail, so the statistics show who opened what. HelpRange does not e-mail links created through the API – send them yourself. Exit codes: 0 ok, 1 API error, 2 usage / configuration error. python -m helprange … works the same.
examples/: share_pdf.py (share a PDF and get a link), who_viewed.py (who viewed a document, through which link, time per page), data_room.py (async: create a room with folders and an NDA, add documents, invite guests and print their links, index, Q&A), webhook_endpoints.py (create / update the endpoint, test event, redeliver, rotate the secret), webhook_server.py (stdlib webhook receiver).
python3 -m venv .venv && .venv/bin/pip install -e '.[dev]' .venv/bin/pytest -q # fake transport, no network .venv/bin/ruff check src tests examples && .venv/bin/mypy src examples src/helprange/_generated/ is generated from the OpenAPI spec – don't edit it by hand; see the generator in the helprange-sdks workspace.
Both files in this release have provenance metadata.
api data room document sharing e-signature helprange sdk virtual data room webhooks
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Both files in this release have been uploaded with provenance metadata.
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.




