Skip to main content

Python SDK for the Valmar platform

Project description

valmar

Python SDK for the Valmar platform.

Documentation: https://docs.getvalmar.com

Source: https://github.com/TheValmarAI/valmar-python

License: Apache-2.0

Installation

uv add valmar

Quick start

from valmar import Valmar

client = Valmar(
    api_key="valmr_proj_sk_...",
    base_url="https://your-valmar-deployment.example.com",
    organization_id="your-org-id",
    project_id="your-project-id",
)

base_url is required because Valmar is deployed per customer. Use the base URL for your own Valmar deployment.

Search knowledge

Find relevant saved knowledge across the configured project.

results = client.knowledge.search("deployment process")

for item in results.items:
    print(f"{item.title} ({item.confidence})")
    print(item.content_md)

Create a knowledge request

Create a knowledge request that gets routed to the right people in your organization.

handle = client.knowledge_requests.create(
    "How do we handle database migrations in production?",
    background_context="Planning a schema change for the orders table",
)

print(f"Request created: {handle.knowledge_request_id}")
print(f"Status: {handle.status}")

request = client.knowledge_requests.get(handle.knowledge_request_id)
if request.status == "completed":
    print(request.result_summary)

List and import people

from valmar import CreatePersonInput

people = client.people.list()

result = client.people.import_bulk(
    [
        CreatePersonInput(
            email="ada@example.com",
            display_name="Ada Lovelace",
            timezone="UTC",
            title="Principal Engineer",
        )
    ]
)

Context manager

with Valmar(
    api_key="valmr_proj_sk_...",
    base_url="https://your-valmar-deployment.example.com",
    organization_id="your-org-id",
    project_id="your-project-id",
) as client:
    results = client.knowledge.search("onboarding process")

Error handling

The SDK raises httpx.HTTPStatusError for non-2xx responses.

import httpx

try:
    client.knowledge.search("test")
except httpx.HTTPStatusError as e:
    print(f"API error {e.response.status_code}: {e.response.text}")

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

valmar-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

valmar-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file valmar-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for valmar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 87e353b2011f8c4e840c3a5148589d7804314daa9d0cc468bc452a58814f4d53
MD5 84554f1b6b5a33077a0affa4e61369e9
BLAKE2b-256 425a42346e104f2294703b05c07418367d1acb597f9449b261735259190d7fa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for valmar-0.1.0.tar.gz:

Publisher: publish.yml on TheValmarAI/valmar-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 valmar-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for valmar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14663a84752851f8242d5c2c85bc376fec45951481a7888eb51d61bd04c347c0
MD5 2d170f2487db8ddb7a6a7f4a80b24486
BLAKE2b-256 c22ae2330222f6cf69f0a38f2c7132cd24cf7944516fc597a5080ef3c5dbac84

See more details on using hashes here.

Provenance

The following attestation bundles were made for valmar-0.1.0-py3-none-any.whl:

Publisher: publish.yml on TheValmarAI/valmar-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