Helix Connect Python SDK
Official Python SDK for the Helix Connect data marketplace platform.
Overview
The Helix Connect SDK gives data producers and consumers programmatic access to the Helix Connect data marketplace. Producers upload and price datasets, manage partner access, and track earnings; consumers browse, subscribe to, and download the datasets they have access to. Every dataset is encrypted in transit and at rest, with encryption, compression, and decryption handled automatically by the SDK.
Installation
pip install "helix-connect>=3.18.8"
Requires Python 3.10 or later.
Authentication & Credentials
API keys (3.16.0+)
Every SDK call is authenticated with two values: HELIX_CUSTOMER_ID and
HELIX_API_KEY. Create the key in the Helix portal
(https://portal.helix.tools) under API Keys.
import os
from helix_connect import HelixConsumer
consumer = HelixConsumer(
customer_id=os.environ["HELIX_CUSTOMER_ID"],
api_key=os.environ["HELIX_API_KEY"],
credential_mode="sts", # fail loudly instead of ever using an AWS key
)
Your application reads HELIX_CUSTOMER_ID and HELIX_API_KEY (for
example from environment variables or a secrets manager) and passes them
into the constructor, as shown throughout this README. The SDK itself reads
only HELIX_API_ENDPOINT, used as a fallback for api_endpoint when it's
omitted; it otherwise defaults to https://api-go.helix.tools.
The SDK exchanges the key for short-lived (15-minute) session credentials and renews them automatically before they expire. Uploads, downloads and notification polling work the same way with every credential.
A missing or blank key is an error. With credential_mode="sts", an
empty or whitespace-only HELIX_API_KEY (an .env line HELIX_API_KEY=,
a secret that failed to load) raises ValueError before any network call,
on every version from 3.16.0. From 3.19.0 the same happens when no
credential_mode is set. In both cases the SDK does not fall back to AWS
credentials it finds on the machine (environment variables, ~/.aws, an
instance role).
Remove any AWS key arguments from your code once your API key works. If you pass both, a non-empty API key wins and the SDK emits one warning; a blank one does not, and the SDK then uses the AWS keys you passed.
# Force an immediate re-mint of the session credentials (a test hook)
consumer.force_refresh()
The constructor also accepts broker_endpoint (override the
credential-broker URL; defaults to api_endpoint), credential_scope
(optional dict merged into the mint request), and auto_refresh (default
True). Available on both HelixConsumer and HelixProducer. The key is
only ever sent over https:// (or to localhost/127.0.0.1, for local
testing). A failed mint raises CredentialRefreshError carrying the
broker's error code (for example subscription_expired); there is no
fallback from a failed key mint to AWS keys.
Legacy AWS access keys (being retired)
AWS access keys are being retired. Switch to an API key; your AWS keys keep
working until your account is moved. Until then the constructor still
accepts aws_access_key_id and aws_secret_access_key in place of
api_key; both must be set. Add credential_mode="sts" to use them only
to obtain the same short-lived session credentials.
Quickstart — Producer
import os
from helix_connect import HelixProducer
producer = HelixProducer(
customer_id=os.environ["HELIX_CUSTOMER_ID"],
api_key=os.environ["HELIX_API_KEY"],
credential_mode="sts", # fail loudly instead of ever using an AWS key
)
# Upload a dataset. Encryption and compression are handled automatically.
dataset = producer.upload_dataset(
file_path="./data/customers.json",
dataset_name="customer-records",
description="Monthly customer export", # required: 10 to 2,000 characters
category="general",
data_freshness="daily",
)
print(f"Uploaded {dataset['name']} ({dataset['id']})")
# List everything this producer has uploaded
my_datasets = producer.list_my_datasets()
print(f"{len(my_datasets)} dataset(s) on this account")
# Update metadata without re-uploading the underlying data
producer.update_dataset(
dataset_id=dataset["id"],
updates={"description": "Updated description with more details"},
)
# Replace a dataset's data by re-uploading a new file (metadata unchanged)
producer.update_dataset_data(
dataset_id=dataset["id"],
file_path="./data/customers-v2.json",
)
Quickstart — Consumer
import os
from helix_connect import HelixConsumer
consumer = HelixConsumer(
customer_id=os.environ["HELIX_CUSTOMER_ID"],
api_key=os.environ["HELIX_API_KEY"],
credential_mode="sts", # fail loudly instead of ever using an AWS key
)
# See what this customer is subscribed to as a consumer
subscriptions = consumer.list_subscriptions(role="consumer")
# List every dataset this customer has access to (follows every page)
datasets = consumer.list_datasets()
# Pass page/limit to walk every page: the return value switches to the full
# envelope (datasets + total_count + page + limit + total_pages) so you know
# when to stop.
page = 1
all_datasets = []
while True:
envelope = consumer.list_datasets(page=page, limit=100)
all_datasets.extend(envelope["datasets"])
if page >= envelope["total_pages"]:
break
page += 1
# Poll the per-consumer notification queue for DATA_PUBLISHED events.
# Messages are auto-acknowledged (deleted) by default once returned.
notifications = consumer.poll_notifications(
max_messages=10,
wait_time_seconds=20,
)
# The SDK does not create the output folder.
os.makedirs("downloads", exist_ok=True)
for notif in notifications:
output_path = f"./downloads/{notif['dataset_id']}.json"
# Every download is decrypted and decompressed automatically.
consumer.download_dataset(
dataset_id=notif["dataset_id"],
output_path=output_path,
)
print(f"Downloaded {notif.get('dataset_name', notif['dataset_id'])} -> {output_path}")
Marketplace
The marketplace surface lets consumers browse and pay for listed datasets,
and lets producers price their own datasets and track earnings. Both
marketplace surfaces raise DatasetNotFoundError (server 404) while
marketplace payments are not yet enabled for your account. Listed prices
are the producer's own; platform terms are at https://helix.tools/#pricing.
Browsing and subscribing (consumer)
# Search + paginate the public listing (all filters optional)
results = consumer.browse_marketplace(search="phone", category="phone-numbers", page=1)
for ds in results["datasets"]:
print(f"{ds['name']}: {ds.get('marketplace')}")
first = results["datasets"][0]
# A composite view: dataset + reviews + related datasets + the caller's
# own subscription info
details = consumer.get_dataset_details(dataset_id=first["id"])
print(details["dataset"]["name"], details["subscription_info"])
# Pay for a priced/listed dataset via Stripe Checkout. Pass exactly one of
# dataset_id (subscribe directly) or request_id (pay for a request that was
# already approved). Returns the Checkout URL only -- the SDK never opens it.
checkout_url = consumer.create_subscription_checkout(dataset_id=first["id"])
print(f"Complete payment at: {checkout_url}")
Pricing and earnings (producer)
producer.set_dataset_marketplace(
dataset_id=dataset["id"],
price_monthly_cents=4900, # $49.00/mo, in USD cents; 0 = free
listed=True,
)
earnings = producer.get_earnings() # optionally get_earnings(period="2026-07")
print(earnings)
Approving requests at a per-consumer price
A producer can pin a different price for each consumer when approving their
subscription request — comp one consumer while charging another for the same
dataset. price_monthly_cents is optional and three-valued:
- omitted — the dataset's own marketplace price applies.
0— a free grant, provisioned immediately even on a currently-paid dataset (comps this consumer).- a positive value — the consumer must complete checkout at that price, even if the dataset is currently free.
# Walks every server page internally and returns every matching request.
requests_ = producer.list_subscription_requests(status="pending")
request_id = requests_["requests"][0]["request_id"]
# Comp this specific consumer regardless of the dataset's own price.
producer.approve_subscription_request(request_id, price_monthly_cents=0)
# Charge a different consumer a custom price for the same dataset (your own
# price, in USD cents -- platform terms are at https://helix.tools/#pricing).
producer.approve_subscription_request(other_request_id, price_monthly_cents=1500)
# Omit the argument to fall back to the dataset's own marketplace price.
producer.approve_subscription_request(third_request_id)
approve_subscription_request returns just the updated subscription
request. To also get the provisioned subscription (e.g. its _id), use
approve_subscription_request_with_subscription, which takes the same
arguments and returns {"request": {...}, "subscription": {...}}:
result = producer.approve_subscription_request_with_subscription(
request_id, price_monthly_cents=0
)
print(result["subscription"]["_id"])
Partner Invites
A producer can self-serve inviting a consumer partner directly — no
platform-admin step required. Requires the partner_invite feature flag on
the producer's account; without it these calls raise PermissionDeniedError.
# Contract violations (bad email, empty datasets, etc.) raise ValueError
# before any network traffic.
result = producer.invite_consumer(
company_name="Acme Analytics",
business_email="data@acme.example",
datasets=[dataset["id"]], # 1-50 dataset IDs auto-granted at invite time
tier="free", # currently the only supported tier
)
print(result["consumer_id"], result["status"])
consumers = producer.list_consumers()
if consumers:
producer.deactivate_consumer(consumer_id=consumers[0]["consumer_id"])
datasets also accepts a list of {"dataset_id": ..., "tier": "free"|"paid"}
objects (typed as helix_connect.InviteConsumerDatasetGrant, the same shape
name used by the TypeScript and Go SDKs) instead of plain ID strings, to comp
this consumer on one dataset while granting paid access to another in the
same invite. Per-dataset tier overrides the invite-wide tier for that
entry; the two forms cannot be mixed in one call.
result = producer.invite_consumer(
company_name="Acme Analytics",
business_email="data@acme.example",
datasets=[
{"dataset_id": dataset["id"], "tier": "free"}, # comp this one
{"dataset_id": other_dataset["id"], "tier": "paid"}, # charge for this one
],
)
Payouts (Stripe Connect)
Producers accept payouts through a hosted Stripe Connect Express flow. The SDK never opens or redirects to any of the returned URLs itself — send the producer to them.
# One-time: connect a Stripe Express account to receive payouts
onboard = producer.connect_onboard()
print(f"Open this to finish onboarding: {onboard['url']}")
# Check payout account status any time
status = producer.get_connect_status()
if status.get("can_price_datasets"):
print("Payouts are enabled — datasets can be priced above $0")
else:
print(f"Still due: {status.get('requirements_due')}")
# Once onboarding is complete, get a one-time link to the Stripe Express
# dashboard (raises PermissionDeniedError if onboarding isn't complete yet)
login = producer.create_connect_login_link()
print(f"Manage your payout account: {login['url']}")
Versioning & Changelog
This SDK follows semantic versioning. See CHANGELOG.md for the full release history.
Support
- Documentation: https://dev.helix.tools (sign in at https://portal.helix.tools and open SDK Docs)
- Email: support@helix.tools
License
See LICENSE for details.
Metadata
Release files for helix-connect 3.19.0
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 |
|---|---|---|---|---|
| helix_connect-3.19.0.tar.gz | 99.8 kB | Without provenance | Details for helix_connect-3.19.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| helix_connect-3.19.0-py3-none-any.whl | Python 3 | none | any | Details for helix_connect-3.19.0-py3-none-any.whl |
Total release size: 198.8 kB
Release files / helix_connect-3.19.0.tar.gz
| Download URL | helix_connect-3.19.0.tar.gz |
|---|---|
| Size | 99.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44cd20e83320d2e106c4b3a3b8936fe512dcdae05b9296cec698b6908df20a20
|
|
BLAKE2b-256 checksum How to use checksums |
b49dcbfb4009d07af692ed046e3a6f05aa09d2ba5f9a38f7dc1a8f42d93857ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / helix_connect-3.19.0-py3-none-any.whl
| Download URL | helix_connect-3.19.0-py3-none-any.whl |
|---|---|
| Size | 98.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6b1379b7c8f496c68701d822ee000b36b33d9d83290c87b1ae8cf4f865e4c20
|
|
BLAKE2b-256 checksum How to use checksums |
4f2488436bfdb20f624653231a89020344ec7fbedbb849dfe57cf85f1aa513a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for helix-connect 3.19.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.