Skip to main content

Semantik Python SDK

Python SDK for the Semantik Client API. Designed for Python 3.8+ applications.

Installation

pip install semantik-sdk
# or with uv:
uv pip install semantik-sdk

Quick Start

from semantik import Semantik
import base64

# Automatically reads from SEMANTIK_API_KEY environment variable (recommended)
# Set SEMANTIK_API_KEY in your .env file or environment
client = Semantik()

# Or override with explicit API key
client = Semantik(api_key="sk_your_api_key_here")

# List programs
programs_response = client.programs.list()
print(f"Found {len(programs_response['programs'])} programs")

# Get a specific program
program = client.programs.get(programs_response['programs'][0]['id'])

# Submit a candidate application
with open('resume.pdf', 'rb') as f:
    cv_content = base64.b64encode(f.read()).decode('utf-8')

result = client.candidates.submit_application(
    candidate={
        "firstName": "John",
        "lastName": "Doe",
        "email": "john.doe@example.com"
    },
    program_id=program['id'],
    step_id=program['steps'][0]['id'],
    documents=[
        {
            "fieldName": "CV",
            "content": cv_content,
            "fileName": "john-doe-cv.pdf",
            "mimeType": "application/pdf",
            "encoding": "base64"
        }
    ]
)

print(f"Application submitted: {result['applicationId']}")
print(f"Candidate ID: {result['candidateId']}")

# Get candidate status
status = client.candidates.get_status(result['candidateId'], include="applications,scores")
print(f"Candidate: {status['candidate']['firstName']} {status['candidate']['lastName']}")

# Move candidate to next step
move_result = client.programs.move_candidate(
    program_id=program['id'],
    candidate_id=result['candidateId'],
    direction="next"
)
print(f"Moved from {move_result['movement']['from']['name']} to {move_result['movement']['to']['name']}")

Configuration

API Key

Set your API key as an environment variable (recommended):

export SEMANTIK_API_KEY=sk_your_api_key_here

Or pass it directly to the client:

client = Semantik(api_key="sk_your_api_key_here")

Base URL

The SDK defaults to production (https://gateway.semantikmatch.com). For local development:

client = Semantik(
    api_key="sk_...",
    base_url="http://localhost:9000"
)

Or set SEMANTIK_BASE_URL environment variable.

API Reference

Programs

  • client.programs.list() - List all programs
  • client.programs.get(program_id) - Get a specific program
  • client.programs.list_candidates(program_id, step_id=None, status=None, search=None, include=None, limit=None, cursor=None) - List candidates in a program
  • client.programs.move_candidate(program_id, candidate_id, direction="next"|"previous", from_step_id=None, to_step_id=None) - Move a candidate between steps

Candidates

  • client.candidates.submit_application(candidate, program_id, step_id, client_data=None, documents=None) - Submit a new application
  • client.candidates.get_status(candidate_id, include=None) - Get candidate status across all programs
  • client.candidates.get_applications(candidate_id, include=None) - Get all applications for a candidate
  • client.candidates.get_scores(candidate_id, include=None) - Get candidate scores
  • client.candidates.enroll(candidate_id, program_id, step_id=None, send_email=None, email_template=None) - Enroll candidate in a program

Error Handling

from semantik import Semantik, ApiError

try:
    program = client.programs.get(999)
except ApiError as e:
    print(f"API Error {e.status}: {e}")
    print(f"Path: {e.path}")
    print(f"Response: {e.response}")
except Exception as e:
    print(f"Unexpected error: {e}")

Type Hints

The SDK includes full type hints for better IDE support and type checking.

Support

For issues or questions, please contact support or visit the documentation.

Metadata

Release files for semantik-sdk 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semantik-sdk 0.1.3
File Size Uploaded Provenance
semantik_sdk-0.1.3.tar.gz 8.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for semantik-sdk 0.1.3
File Interpreter ABI Platform
semantik_sdk-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / semantik_sdk-0.1.3.tar.gz

Download URL semantik_sdk-0.1.3.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2d4d38f9ca9d2173c70f92a20cbb39ec978346e0112d9220b738ce8d1c6c2dbc
BLAKE2b-256 checksum
How to use checksums
bc03ae6551f2eb4aa59ef8ccd286120b2d34fa4e6f6e3de9c1be80bc40570424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / semantik_sdk-0.1.3-py3-none-any.whl

Download URL semantik_sdk-0.1.3-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63daa1bd208bd79cf8de1acbcd6f667fe1a61a4eebab19cd64c8f72cfd2a998d
BLAKE2b-256 checksum
How to use checksums
8922a0272af7e7c8569487ac33687abf41abbdec82404a7948e929bd65687162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for semantik-sdk 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page