Lighthouse Python SDK
Official Python client for the Lighthouse REST API. Wraps the CRM, Discovery, Reports, and Documents endpoints behind a single typed Lighthouse class.
Installation
pip install lighthouse-private-markets-sdk
Quick Start
Generate an API key at Settings → API Keys in your Lighthouse workspace.
from lighthouse import Lighthouse
client = Lighthouse("lgt_live_...")
# Who am I?
me = client.users.me()
print(me.data)
# Search your CRM
res = client.records.search(
"company",
filters={
"operator": "AND",
"conditions": [
{"field": "domain", "operator": "contains_any", "value": ["acme.com"]}
],
},
limit=10,
)
print(res.data, res.meta)
Every method returns an APIResponse:
class APIResponse:
data: Any # response payload
error: Any | None # error message if the call failed
meta: dict | None # pagination/meta info (when present)
status: int # HTTP status code
res.raise_for_error() # raises LighthouseError if error is set
Authentication
The client sends Authorization: Bearer <api_key> on every request. Keep API keys secret. Never ship them in client-side code.
Resources
| Namespace | Endpoints |
|---|---|
client.records |
search / get / create / update / delete records (company, person, deal, custom objects) |
client.lists |
list / get / create / update / delete, get_records, add_record, remove_record, share/revoke teams, update_sharing |
client.notes |
list / get / create / delete, link_record, unlink_record |
client.tasks |
list / get / create / update / delete |
client.attributes |
list / get / create / update / delete, colors |
client.options |
list / create / delete select-field options |
client.views |
list / get / update / delete, share/revoke teams, update_sharing |
client.users |
me, list, get |
client.teams |
list, get |
client.dashboards |
list / get / create / update / delete, list_widgets, create_widget, update_widget, delete_widget, widget_data, share/revoke teams |
client.discovery |
get_attributes, search_companies, search_people, semantic_search_companies, semantic_search_people, lookup_companies_by_domain, lookup_companies_by_linkedin, lookup_people_by_linkedin, get_saved_searches, get_search_results, get_locations, get_industries, get_tags, search_investors, search_organizations, search_schools |
client.documents |
folders + files (v2): list_folders, create_folder, update_folder, delete_folder, link/unlink_folder, upload_url, get_file, update_file, delete_file, link/unlink_file, list_record_documents, upload() one-shot helper |
client.inbox |
email_account_me, email_accounts, email_conversations, email_conversation, create_email_draft, download_email_attachment, linkedin_account_me, linkedin_accounts, linkedin_chats, linkedin_chat_messages, download_linkedin_attachment, calendar_account_me, calendar_accounts, calendar_meetings, calendar_meeting, calendar_meeting_notes, calendar_meeting_transcript |
client.ai_reports |
list, get |
Examples
Inbox
# Accounts you can access (own + shared), with permission flags
accounts = client.inbox.email_accounts()
# Email conversations with a CRM company (its domains), newest first
convos = client.inbox.email_conversations(
record_id=company_id, record_type="company", limit=50
)
# convos.meta["accounts"] reports per-account failures
# (rate_limited, account_disconnected)
# Read one conversation (account_id is required: the row's account id)
first = convos.data[0]
convo = client.inbox.email_conversation(first["id"], account_id=first["account"]["id"])
# Download an attachment from a message
msg = convo.data["messages"][0]
if msg.get("attachments"):
# raises LighthouseError over the 25 MB limit (413 attachment_too_large)
content = client.inbox.download_email_attachment(
msg["id"], msg["attachments"][0]["id"], account_id=msg["account"]["id"]
)
# Draft a reply. The draft is saved in the mailbox, never sent. Recipients
# are always explicit, and reply_to_message_id is a MESSAGE id.
draft = client.inbox.create_email_draft(
account_id=msg["account"]["id"],
to=[msg["from"]["email"]],
subject=f"Re: {msg['subject']}",
body="<p>Thanks for the note, following up shortly.</p>",
conversation_id=convo.data["conversation"]["id"],
reply_to_message_id=msg["id"],
)
# LinkedIn: find chats with a person, then read one
chats = client.inbox.linkedin_chats(person_linkedin="https://linkedin.com/in/username")
chat = client.inbox.linkedin_chat_messages(chats.data[0]["id"])
Records
# Create
created = client.records.create("company", data={
"name": "Acme",
"domain": ["acme.com"],
})
record_id = created.data["id"]
# Update: relation fields are replaced entirely, so pass the full desired array
client.records.update("company", record_id, data={"domain": ["acme.com", "acme.io"]})
# Get
client.records.get("company", record_id)
# Delete
client.records.delete("company", record_id)
Filtering with attributes
attrs = client.attributes.list(record_type="company").data
# pick a field permalink from attrs, then:
client.records.search(
"company",
filters={
"operator": "AND",
"conditions": [{"field": "headcount", "operator": "gte", "value": 50}],
},
sort=[{"field": "name", "direction": "asc"}],
limit=25,
)
Lists
new_list = client.lists.create(name="Hot leads", record_type="company")
list_id = new_list.data["id"]
client.lists.add_record(list_id, record_id="…uuid…")
client.lists.get_records(list_id, limit=50)
Notes
client.notes.create(
title="Intro call",
content="<p>Met the founder, looking strong.</p>",
records={"company": ["…uuid…"], "person": ["…uuid…"]},
tags=["follow_up"],
)
# Manage the workspace tag vocabulary and attach tags to a note.
tag = client.note_tags.create("Follow up")
client.notes.add_tags("…note_uuid…", tags=[tag.data["permalink"]])
Tasks
client.tasks.create(
title="Send follow-up",
due_date="2026-06-01",
assigned_to=["…user_uuid…"],
records={"company": ["…uuid…"]},
)
tasks.list() filters and sorts on these fields: title, status,
priority, due_date, created_at, updated_at, assigned_to,
created_by, records, plus any custom task field permalinks. Status values
are workspace-specific (fetch the valid values with
client.options.list("task", "status")).
client.tasks.list(
filters={
"operator": "AND",
"conditions": [{"field": "status", "operator": "eq", "value": "todo"}],
},
sort=[{"field": "due_date", "direction": "asc"}],
limit=50,
)
Discovery
# Always inspect attributes first to discover valid field keys
client.discovery.get_attributes(type="company")
# Search Lighthouse's global database
res = client.discovery.search_companies(
filters={
"operator": "AND",
"conditions": [
{"field": "company_hq_country", "operator": "contains_any", "value": ["US"]},
{"field": "company_headcount", "operator": "between", "value": {"min": 10, "max": 200}},
],
},
limit=25,
)
# Enrich by domain / LinkedIn
client.discovery.lookup_companies_by_domain(["stripe.com", "openai.com"])
# Semantic search with a plain-language query (optionally narrowed by filters)
res = client.discovery.semantic_search_companies(
"climate fintech startups building carbon accounting software",
filters={
"operator": "AND",
"conditions": [
{"field": "company_hq_country", "operator": "contains_any", "value": ["US"]},
],
},
min_similarity=0.5,
limit=25,
)
Documents
# One-shot helper handles upload-url + the multipart POST upload
with open("pitch.pdf", "rb") as f:
file = client.documents.upload(
name="pitch.pdf",
content=f.read(),
content_type="application/pdf",
sharing_status="WORKSPACE",
)
file_id = file.data["id"]
# Attach to a record
client.documents.link_file_to_record(file_id, "company", "…uuid…")
Error handling
from lighthouse import Lighthouse, LighthouseError
client = Lighthouse("lgt_live_…")
try:
res = client.records.search("company")
res.raise_for_error()
print(res.data)
except LighthouseError as e:
print(f"API error ({e.status_code}):", e)
Low-level escape hatch
For endpoints not yet wrapped by a namespace:
res = client.request("GET", "/v1/some/new/endpoint", params={"foo": "bar"})
res = client.request("POST", "/v1/some/other", json={"hello": "world"})
License
MIT, see LICENSE.
Metadata
Release files for lighthouse-private-markets-sdk 0.9.2
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 |
|---|---|---|---|---|
| lighthouse_private_markets_sdk-0.9.2.tar.gz | 10.6 kB | Without provenance | Details for lighthouse_private_markets_sdk-0.9.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lighthouse_private_markets_sdk-0.9.2-py3-none-any.whl | Python 3 | none | any | Details for lighthouse_private_markets_sdk-0.9.2-py3-none-any.whl |
Total release size: 22.3 kB
Release files / lighthouse_private_markets_sdk-0.9.2.tar.gz
| Download URL | lighthouse_private_markets_sdk-0.9.2.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19b8bf8aca5884d70314d09ebbb2dfdbf496cbae3e4a5021dfcdd9c0e6a559be
|
|
BLAKE2b-256 checksum How to use checksums |
a898c40f5453caf4fa8a7feb699bf28ee4c82de05adff30ed3acce81fd885d41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / lighthouse_private_markets_sdk-0.9.2-py3-none-any.whl
| Download URL | lighthouse_private_markets_sdk-0.9.2-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6b327d2695bfc25d8da77534be08f94380e16ded3e7f941c3840b37b6e83516
|
|
BLAKE2b-256 checksum How to use checksums |
9bcd7ff6aa92d8e86a34fdda300485f6b82bcd30509a34199bb9900f8042b284
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Security for lighthouse-private-markets-sdk 0.9.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.
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.