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:
- Capture the function signature, type hints, and docstring
- Send this information to the mock endpoint
- Convert the mock response to the expected return type
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file veris_ai-0.2.0.tar.gz.
File metadata
- Download URL: veris_ai-0.2.0.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d030cf5b3c3c50cbfc836f70c591f75b2f3f2f30ed0ee4a8952cbbde03c34d83
|
|
| MD5 |
05da89a639a8b0bbfa5db2b174a459da
|
|
| BLAKE2b-256 |
5d81ab396e78d858eba675c9a91cec18b377af3034c5eb42dd837ea67535e959
|
File details
Details for the file veris_ai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: veris_ai-0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a9e72a9998f3fe6ed4c1797e5dd3c07f745ac1590fc677deff78253a6af225a
|
|
| MD5 |
903a6b939eddebee0d6e66fcf3338419
|
|
| BLAKE2b-256 |
f2e7dae5ed2af5fe3aee9707cb4ac619bef21f16b5fe9ae0957f34b0826bfd65
|