Skip to main content

No project description provided

Project description

Vitruvi Python Library

pypi fern shield

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!

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

vitruvi_sdk-0.0.10.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

vitruvi_sdk-0.0.10-py3-none-any.whl (52.2 kB view details)

Uploaded Python 3

File details

Details for the file vitruvi_sdk-0.0.10.tar.gz.

File metadata

  • Download URL: vitruvi_sdk-0.0.10.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-1039-azure

File hashes

Hashes for vitruvi_sdk-0.0.10.tar.gz
Algorithm Hash digest
SHA256 952e9037b5f583556caf17e417e6e8696c74ad9139f623812a29eba69b2307ea
MD5 5bf55414dda003866b064761bd385e64
BLAKE2b-256 f94e0078e8d290c4d4d63eab954a716d2f15c94e8643a072db0e3d47b484fa22

See more details on using hashes here.

File details

Details for the file vitruvi_sdk-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: vitruvi_sdk-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 52.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-1039-azure

File hashes

Hashes for vitruvi_sdk-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 5b21e47b2c0a7d0ecdc5ff2b9eaf225c86add25db2ef5a86370820112862f94e
MD5 0f2a86a8a3da7006e3aef8e46d7b158e
BLAKE2b-256 ddd1cd6f3ace49f483fb99fadbd30750df14181d57cad0fa2e19d892356ea9da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page