Python SDK for the Lighthouse REST API (CRM, Discovery, Reports, Documents).
Project description
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, 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, finalize_file, get_file, update_file, delete_file, link/unlink_file, list_record_documents, upload() one-shot helper |
Examples
Records
# Create
created = client.records.create("company", data={
"name": "Acme",
"domain": ["acme.com"],
})
record_id = created.data["id"]
# Update — relation fields are replaced entirely; 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…"]},
)
Tasks
client.tasks.create(
title="Send follow-up",
due_date="2026-06-01",
assigned_to=["…user_uuid…"],
records={"company": ["…uuid…"]},
)
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"])
Documents
# One-shot helper handles upload-url + PUT + finalize
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lighthouse_private_markets_sdk-0.3.2.tar.gz.
File metadata
- Download URL: lighthouse_private_markets_sdk-0.3.2.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4bb62d84bef447948e381b0897a5a5fdf1ca3902a5db4a4b0603a0b4282a2da
|
|
| MD5 |
7fc7a427036345d5ae28d2ade7a6ff5c
|
|
| BLAKE2b-256 |
e2fa1cca45560816c619e05078d74e9a5438decdbea23f89383a5d9435f356e3
|
File details
Details for the file lighthouse_private_markets_sdk-0.3.2-py3-none-any.whl.
File metadata
- Download URL: lighthouse_private_markets_sdk-0.3.2-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6898cd2a8ac2b3bebbbf247e1d490b05a9647f5fcd1cba318de13cbf7536254
|
|
| MD5 |
ba3e15cf5bd583deb969385bd3ff506a
|
|
| BLAKE2b-256 |
df89d44ebda651bd24466f854e74d709291e04a62e54084b5ea2ae6ecaf90948
|