Skip to main content

Async Python client library for the Valentina Noir API

Project description

Valentina Python Client

Async and sync Python client library for accessing the Valentina Noir API.

Features

  • Async and sync clients - Both VClient (async) and SyncVClient (sync) built on httpx
  • Type-safe - Full type hints with Pydantic models for request/response validation
  • Convenient factory pattern - Create a client once, access services from anywhere
  • Automatic pagination - Stream through large datasets with iter_all() or fetch everything with list_all()
  • Robust error handling - Specific exception types for different error conditions
  • Idempotency support - Optional automatic idempotency keys for safe retries
  • Rate limit handling - Built-in support for automatic rate limit retries

This client is a supported and up-to-date reference implementation for the Valentina Noir API.

Documentation

The full documentation is available at https://natelandau.github.io/valentina-python-client/.

Claude Code Skill

This repo includes a Claude Code skill that gives Claude deep knowledge of vclient's services, models, constants, and testing utilities. Install it so Claude can help you build applications against the Valentina API.

Install

claude install-skill /path/to/valentina-python-client/vclient-guide-skill

Once installed, Claude will automatically activate the skill when you're working with vclient imports, Valentina API endpoints, or FakeVClient testing.

Development Tools

Validate Constants

Verify that the Literal type constants in this package are in sync with the live API's /options endpoint. This catches drift between client and server before a release.

# Via duty task
uv run duty validate_constants

# Via script directly
uv run python scripts/validate_constants.py --api-key <key> --company-id <id>

The script reads configuration from (highest precedence first):

  1. CLI arguments (--api-url, --api-key, --company-id)
  2. System environment variables (VALENTINA_CLIENT_BASE_URL, VALENTINA_CLIENT_API_KEY, VALENTINA_CLIENT_DEFAULT_COMPANY_ID)
  3. A .env.secret file in the project root

Exit codes: 0 = all constants match, 1 = mismatches found, 2 = missing configuration.

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

valentina_python_client-2.7.0.tar.gz (121.7 kB view details)

Uploaded Source

Built Distribution

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

valentina_python_client-2.7.0-py3-none-any.whl (178.2 kB view details)

Uploaded Python 3

File details

Details for the file valentina_python_client-2.7.0.tar.gz.

File metadata

  • Download URL: valentina_python_client-2.7.0.tar.gz
  • Upload date:
  • Size: 121.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for valentina_python_client-2.7.0.tar.gz
Algorithm Hash digest
SHA256 3631648b67921ee073f8bb4110bfd93bf5454a51b1e54a1f6e22b5e3dbdbc41a
MD5 c416f9a1a0b24292a81e17952e5d048c
BLAKE2b-256 f972e3b59bd353e633e7d2c646046be3ec2c825fc7b8a48d8ed30906f4f89657

See more details on using hashes here.

File details

Details for the file valentina_python_client-2.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for valentina_python_client-2.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 504c8d451e91c7cbed33cbdca1af7c5a95e3679337040af556e2a03d2036c2d5
MD5 32787617a3d81f95dfc4603e84e96758
BLAKE2b-256 14f2a8c9ebbf81adbcf48983ca87f2caf3a9d15a295118d5af0f6140631d4f26

See more details on using hashes here.

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