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.1.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.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: veris_ai-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 eaf9a6a9a0b4ad578b0e1a78b7aba685d0e09c6048433b719c8eb966c91525e4
MD5 151eb4cfca6cf9ee82551f6ef28efc17
BLAKE2b-256 d0ab4a4dc18ec1f257c3a8e940538b33e19ac2ab5ed5788c9f20f0ff9e352381

See more details on using hashes here.

File details

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

File metadata

  • Download URL: veris_ai-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55bfc72644c97c1cd55b113227e48a1eaf20ac7a9457297a10910e71eb825e74
MD5 4079098b0f25c450e24cfbcecf18b72f
BLAKE2b-256 3915a0b5b3a0a7e5c16816bdd955652a687ba939b99ab8bedc9d5ba4909f8e06

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