Skip to main content

Python SDK for the VynCo Swiss Corporate Intelligence API

Project description

vynco

Python SDK for the VynCo Swiss Corporate Intelligence API. Access 500,000+ Swiss companies from the commercial register with change tracking, sanctions screening, AI-powered risk analysis, network graphs, watchlists, webhooks, and bulk data exports.

Installation

pip install vynco

Or with uv:

uv add vynco

Quick Start

import vynco

client = vynco.Client("vc_live_your_api_key")

# List companies with filtering
result = client.companies.list(query="Novartis", canton="BS")
print(f"Found {result.data.total} companies")

# Get a single company
company = client.companies.get("CHE-105.805.080")
print(f"{company.data.name}: {company.data.legal_form}")

# Full company details with persons, changes, relationships
full = client.companies.get_full("CHE-105.805.080")
print(f"Board: {len(full.data.persons)} persons")

# Sanctions screening
screening = client.screening.screen(name="Suspicious Corp")
print(f"Risk: {screening.data.risk_level} ({screening.data.hit_count} hits)")

# AI risk score
risk = client.ai.risk_score(uid="CHE-105.805.080")
print(f"Risk score: {risk.data.overall_score}/100 ({risk.data.risk_level})")

# Credit balance
credits = client.credits.balance()
print(f"Credits remaining: {credits.data.balance}")

Async Usage

import vynco

async def main():
    async with vynco.AsyncClient("vc_live_your_api_key") as client:
        result = await client.companies.list(query="Novartis")
        print(result.data.items[0].name)

API Coverage

18 resource modules covering 90+ endpoints:

Resource Methods
client.health check
client.companies list, get, get_full, count, events, statistics, compare, news, reports, relationships, hierarchy, classification, fingerprint, structure, acquisitions, nearby, notes, create_note, update_note, delete_note, tags, create_tag, delete_tag, all_tags, export_excel
client.auditors history, tenures
client.dashboard get
client.screening screen
client.watchlists list, create, delete, companies, add_companies, remove_company, events
client.webhooks list, create, update, delete, test, deliveries
client.exports create, get, download
client.ai dossier, search, risk_score
client.api_keys list, create, revoke
client.credits balance, usage, history
client.billing create_checkout, create_portal
client.teams me, create, members, invite_member, update_member_role, remove_member, billing_summary, join
client.changes list, by_company, statistics
client.persons board_members, search, get
client.analytics cantons, auditors, cluster, anomalies, rfm_segments, cohorts, candidates
client.dossiers create, list, get, delete, generate
client.graph get, export, analyze

Response Metadata

Every response includes header metadata for credit tracking and rate limiting:

resp = client.companies.get("CHE-105.805.080")

print(f"Request ID: {resp.meta.request_id}")               # X-Request-Id
print(f"Credits used: {resp.meta.credits_used}")            # X-Credits-Used
print(f"Credits remaining: {resp.meta.credits_remaining}")  # X-Credits-Remaining
print(f"Rate limit: {resp.meta.rate_limit_limit}")          # X-RateLimit-Limit
print(f"Rate remaining: {resp.meta.rate_limit_remaining}")  # X-RateLimit-Remaining
print(f"Rate reset: {resp.meta.rate_limit_reset}")          # X-RateLimit-Reset
print(f"Data source: {resp.meta.data_source}")              # X-Data-Source

Configuration

client = vynco.Client(
    api_key="vc_live_xxx",
    base_url="https://vynco.ch/api",  # default
    timeout=30.0,                     # seconds, default
    max_retries=2,                    # default, retries on 429/5xx
)

The API key can also be set via the VYNCO_API_KEY environment variable:

export VYNCO_API_KEY=vc_live_your_api_key
client = vynco.Client()  # reads from VYNCO_API_KEY

The client automatically retries on HTTP 429 (rate limited) and 5xx (server error) with exponential backoff (500ms x 2^attempt). It respects the Retry-After and X-RateLimit-Reset headers when present.

Error Handling

All API errors are mapped to typed exceptions:

try:
    company = client.companies.get("CHE-000.000.000")
except vynco.AuthenticationError:
    print("Invalid API key")
except vynco.InsufficientCreditsError:
    print("Top up credits")
except vynco.ForbiddenError:
    print("Insufficient permissions")
except vynco.NotFoundError as e:
    print(f"Not found: {e.detail}")
except vynco.ValidationError as e:
    print(f"Bad request: {e.detail}")
except vynco.ConflictError:
    print("Resource conflict")
except vynco.RateLimitError:
    print("Rate limited, retry later")
except vynco.ServerError:
    print("Server error")
except vynco.VyncoError as e:
    print(f"Error ({e.status}): {e.detail}")
Exception HTTP Status
AuthenticationError 401
InsufficientCreditsError 402
ForbiddenError 403
NotFoundError 404
ConflictError 409
ValidationError 400, 422
RateLimitError 429
ServerError 5xx
ServiceUnavailableError 503
ConfigError — (client misconfiguration)

Requirements

  • Python 3.11+
  • httpx (async + sync HTTP)
  • Pydantic v2 (model validation)

Development

uv sync                     # install dependencies
uv run pytest               # run tests
uv run ruff check src/      # lint
uv run ruff format src/     # format
uv run mypy src/            # type check

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vynco-3.0.0.tar.gz (86.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vynco-3.0.0-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file vynco-3.0.0.tar.gz.

File metadata

  • Download URL: vynco-3.0.0.tar.gz
  • Upload date:
  • Size: 86.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vynco-3.0.0.tar.gz
Algorithm Hash digest
SHA256 5bc745dd965af53ed317c20ab16a05b8dc3e4a60cc47ae829d784f6a1cc4b9d6
MD5 ab1acfac69a8af550eac44313c62e7a2
BLAKE2b-256 2b6701a9d44b7bea2ac94d312c8bb308682e5176e3fbb4bec9ac736d85096fa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for vynco-3.0.0.tar.gz:

Publisher: publish.yml on VynCorp/vc-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vynco-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: vynco-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vynco-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acec6888da716f710a163959ca39537d932b279b965243a737bc682d9a31939c
MD5 c339d14d0e8dd785291a8a0bcf214d03
BLAKE2b-256 031b9c7367f1bb22cf7056199c36e41200e800b3d6babb0f60724ceb9331a7f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vynco-3.0.0-py3-none-any.whl:

Publisher: publish.yml on VynCorp/vc-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page