Vitruvi Python Library
Installation
Add this dependency to your project's build file:
pip install vitruvi-sdk
# or
poetry add vitruvi-sdk
Authorization
You can use either a JWT or a Bearer token to authenticate with Vitruvi.
from vitruvi.client import Vitruvi
vitruvi_client = Vitruvi(api_key="Bearer YOUR_TOKEN")
vitruvi_client = Vitruvi(api_key="JWT YOUR_JWT")
Usage
from vitruvi.client import Vitruvi
vitruvi_client = Vitruvi(api_key="Bearer YOUR_TOKEN")
permission = vitruvi_client.create_auth_permissions(Vitruvi.Permission(
id="permission-id",
name="permission-name",
codename="codename")
))
print(permission)
Async client
This SDK also includes an async client, which supports the await syntax:
import asyncio
from vitruvi.client import AsyncVitruvi
vitruvi_client = AsyncVitruvi(api_key="Bearer YOUR_TOKEN")
async def create_permission() -> None:
permission = vitruvi_client.create_auth_permissions(Vitruvi.Permission(
id="permission-id",
name="permission-name",
codename="codename")
))
print(permission)
asyncio.run(create_permission())
Beta status
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning the package version to a specific version in your pyproject.toml file. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
Contributing
While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!
On the other hand, contributions to the README are always very welcome!
Release files for vitruvi-sdk 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vitruvi_sdk-0.0.10.tar.gz | 18.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vitruvi_sdk-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 70.7 kB
Release files / vitruvi_sdk-0.0.10.tar.gz
| Download URL | vitruvi_sdk-0.0.10.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
952e9037b5f583556caf17e417e6e8696c74ad9139f623812a29eba69b2307ea
|
|
BLAKE2b-256 checksum How to use checksums |
f94e0078e8d290c4d4d63eab954a716d2f15c94e8643a072db0e3d47b484fa22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-1039-azure
|
Release files / vitruvi_sdk-0.0.10-py3-none-any.whl
| Download URL | vitruvi_sdk-0.0.10-py3-none-any.whl |
|---|---|
| Size | 52.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b21e47b2c0a7d0ecdc5ff2b9eaf225c86add25db2ef5a86370820112862f94e
|
|
BLAKE2b-256 checksum How to use checksums |
ddd1cd6f3ace49f483fb99fadbd30750df14181d57cad0fa2e19d892356ea9da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-1039-azure
|