Usage
Install with pip
pip install viur-assistant
Install with pipenv
pipenv install viur-assistant
Register module
Import the Assistant module in the module loader in your project.
# deploy/modules/__init__.py
from viur.assistant import Assistant as assistant # noqa
Note: the # noqa prevents your IDE from removing the import for refactorings,
as this is considered unnecessary (in this file).
Configuration
Import the assistant CONFIG in your project and set up the API keys.
# deploy/main.py
from viur.core import secret
from viur.assistant import CONFIG as ASSISTANT_CONFIG
ASSISTANT_CONFIG.api_openai_key = "..."
ASSISTANT_CONFIG.api_anthropic_key = secret.get("api-anthropic-key")
Note: Using the Google Secret Manager is the more secure way. But of course the value can also be loaded from the env — as long as the value is provided as a string.
Development / Contributing
Create a fork and clone it
Setup & Run tests
- Install viur-assistant as editable in your project.
cd my-project pip install -e path/to/viur-assistant[testing] cd path/to/viur-assistant
- Launch the local development server
- Get a valid session cookie and store it in the environment
export SESSION_COOKIE="viur_cookie_$project=abc***xyz"
This is necessary because the Assistant API is only accessible to admins. - Run the tests with pytest
pytest tests -s
Branches
Depending on what kind of change your Pull Request contains, please submit your PR against the following branches:
- main: fixes/patches that fix a problem with existing code go into this branch.
- develop: new features, refactorings, or adjustments for new versions of dependencies are added to this branch.
Metadata
Release files for viur-assistant 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| viur_assistant-1.2.0.tar.gz | 16.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| viur_assistant-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.9 kB
Release files / viur_assistant-1.2.0.tar.gz
| Download URL | viur_assistant-1.2.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fb243178a6512bc47d0c521f6c54ad6588f57f3c4e95b9a8940438f55d22bdf
|
|
BLAKE2b-256 checksum How to use checksums |
998cdf90caa19602287861ef130da88fbde2f4242197adbd61a40856416b62e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 6, 2025.
Transparency logRelease files / viur_assistant-1.2.0-py3-none-any.whl
| Download URL | viur_assistant-1.2.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24c7c87338a1617b259bdd5fc1fc979a1bf3038dd69391c7164b360c2d3c8f1a
|
|
BLAKE2b-256 checksum How to use checksums |
7a8c38afbddb240be729d043dc2c1dd22eb4a0a96710655cbbb2312fbd838e36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 6, 2025.
Transparency log