Skip to main content

A Python package for Veris AI tools

Project description

Veris AI Python SDK

A Python package for Veris AI tools with simulation capabilities.

Installation

You can install the package using uv:

# Install the package
uv add veris-ai

# Install with development dependencies
uv add "veris-ai[dev]"

Environment Setup

The package requires the following environment variables:

# Required: URL for the mock endpoint
VERIS_MOCK_ENDPOINT_URL=http://your-mock-endpoint.com

# Optional: Timeout in seconds (default: 30.0)
VERIS_MOCK_TIMEOUT=30.0

# Optional: Set to "simulation" to enable mock mode
ENV=simulation

Python Version

This project requires Python 3.11 or higher. We use pyenv for Python version management.

To set up the correct Python version:

# Install Python 3.11.0 using pyenv
pyenv install 3.11.0

# Set the local Python version for this project
pyenv local 3.11.0

Usage

from veris_ai import veris

@veris.mock()
async def your_function(param1: str, param2: int) -> dict:
    """
    Your function documentation here.
    
    Args:
        param1: Description of param1
        param2: Description of param2
        
    Returns:
        A dictionary containing the results
    """
    # Your implementation here
    return {"result": "actual implementation"}

When ENV=simulation is set, the decorator will:

  1. Capture the function signature, type hints, and docstring
  2. Send this information to the mock endpoint
  3. Convert the mock response to the expected return type
  4. Return the mock result

When not in simulation mode, the original function will be executed normally.

Development

This project uses pyproject.toml for dependency management and uv for package installation.

Development Dependencies

To install the package with development dependencies:

uv add "veris-ai[dev]"

This will install the following development tools:

  • Ruff: Fast Python linter
  • pytest: Testing framework
  • pytest-asyncio: Async support for pytest
  • pytest-cov: Coverage reporting for pytest
  • black: Code formatter
  • mypy: Static type checker
  • pre-commit: Git hooks for code quality

Code Quality

This project uses Ruff for linting and code quality checks. Ruff is a fast Python linter written in Rust.

To run Ruff:

ruff check .

To automatically fix issues:

ruff check --fix .

The Ruff configuration is defined in pyproject.toml under the [tool.ruff] section.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

veris_ai-0.2.1.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

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

veris_ai-0.2.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file veris_ai-0.2.1.tar.gz.

File metadata

  • Download URL: veris_ai-0.2.1.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for veris_ai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0f931f819e37832a4fdff5f5acaac049c4af5837f768e88155f515505e3352af
MD5 a2bb06180bf17344a685a75880759e5e
BLAKE2b-256 3a20db09634db4078c3e192b58bf0d8b0400c7b655c0ae76ed9827dc62c83140

See more details on using hashes here.

File details

Details for the file veris_ai-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: veris_ai-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for veris_ai-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3ce6c6e7372f8931903bbd2983b040942c58eb6793004c4f6ad748539c85878
MD5 1b720f4b25624829d5082e9a4a6231aa
BLAKE2b-256 8c8b911e81467558be3fc5701397fed8ca7f95e1ebb45130d2871e833243ea94

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