Official Python SDK for the OilFlow Network compliance APIs.
Project description
oilflow (Python SDK)
Official Python SDK for the OilFlow Network compliance APIs.
- Regulatory Matrix (235 jurisdictions)
- KYC-as-API + UBO + multilingual Adverse Media
- Scam Cluster Intelligence Feed
- Webhooks with HMAC verification helper (raw / Slack / Teams formats)
- Regulator-ready reports (FATF Rec.10, FinCEN CDD, EU 6AMLD, FCA SYSC 18, MAS 626, OFSI)
- LC discrepancy detection (UCP 600)
- Customer watchlist sync
- Paginated audit log streaming
Built-in retry with jittered exponential backoff for 5xx + 429 responses (Retry-After respected). Python 3.9+.
Install
pip install oilflow
Quick start
from oilflow import Client
client = Client() # reads OILFLOW_API_KEY from env
result = client.kyc.screen(
company_name="Acme Trading FZE",
country="UAE",
directors=["Jane Doe"],
)
print(result["verdict"]) # "pass" / "review" / "fail"
print(result["screening_run_id"])
Regulatory check
check = client.regulatory.check(
country="Kenya",
product="crude",
listing_type="demand",
)
if not check["allowed"]:
for blocker in check["blockers"]:
print(blocker["reason"])
Verify a webhook delivery
from oilflow import verify_webhook_signature
@app.route("/webhooks/oilflow", methods=["POST"])
def webhook():
raw = request.get_data()
if not verify_webhook_signature(
raw,
request.headers.get("X-OilFlow-Signature"),
OILFLOW_WEBHOOK_SECRET,
):
abort(401)
# process request.json
Subscribe to webhook events
sub = client.webhooks.create(
url="https://your-app.example.com/webhooks/oilflow",
events=["kyc.match_detected", "cluster.entity_added"],
description="Compliance war-room",
)
# sub["secret"] is shown once; store it in your secret manager
For Slack/Teams native rendering, set delivery_format="slack" (URL must be a hooks.slack.com incoming webhook) or "teams" (webhook.office.com). OilFlow renders the payload as Block Kit / Adaptive Card on the server — no HMAC secret is issued.
Stream the audit log
for page in client.audit.pages(days=90):
print(f"page: {page['count']} rows")
# ship to your warehouse
Configuration
Client(
api_key="oilflow_live_...", # or OILFLOW_API_KEY env var
base_url="https://oilflow.us", # or OILFLOW_BASE_URL env var
max_retries=5,
base_retry_delay=0.25,
timeout=30.0,
)
Error handling
from oilflow import OilFlowApiError
try:
client.kyc.screen(company_name="...")
except OilFlowApiError as e:
print(e.status_code, e.error_code, e.request_id)
error_code is a stable, branchable identifier (auth_required, scope_denied, rate_limited, invalid_param, etc.).
Sandbox
Get a free sandbox key (7-day, 100 calls/day, read-only) without signup at https://oilflow.us/sandbox. Pass it as api_key to evaluate the API end-to-end before upgrading.
Documentation
- Full API reference: https://oilflow.us/api-docs
- OpenAPI 3.1 spec: https://oilflow.us/openapi.yaml
License
Apache-2.0.
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 oilflow-0.1.0.tar.gz.
File metadata
- Download URL: oilflow-0.1.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f73fc244badacf9e9b8f809c1da3484037bcd8cefaaf6e1698717116c27a5357
|
|
| MD5 |
6fc624325d2c1ccbf73eb1a21c2e37d2
|
|
| BLAKE2b-256 |
3e20656b3c9da6da1bfbc43fb91cb631df678e549ce7618a6e5b41a8ed81d9a2
|
File details
Details for the file oilflow-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oilflow-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
503a9846c643caaf6033a08b703a1e39a541e9c61af1d124c33984bb263fa607
|
|
| MD5 |
39acccd623c177ab9d1e2ecf16e7855a
|
|
| BLAKE2b-256 |
a9a53725957932fc68fbdabcf6504bc63cde172c85d372d653d7b8f96dc40b87
|