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.1.0.tar.gz (9.8 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.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for veris_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b282dccb7e4d566c87a509b7bba96103c01532888cd12687e0b0af56b62a118
MD5 3206bcd38c621aff3ab2e4057570111c
BLAKE2b-256 2107cdfbd4acece6c8255f34ad5791ba5f254653ff1eb0101025fd13dd49de0e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for veris_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20e6dac0392fdca8bff8f54256d3b359dcaf80792144799fa79dc4382feb8aca
MD5 a9ec6c470c8eedf8fac40251b4a17ee1
BLAKE2b-256 98a9ee3642c09ae354d2fe2b35fedf5bb785816c7d458b7c46bdaf28c0921c16

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