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.9.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: vitruvi_sdk-0.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 e7ff7745db12547c3dae1638e14955a71a61c8ceaf82402518d66031fd5dc03e
MD5 36ee913a56840875437e7f3a145b2ec6
BLAKE2b-256 3380605c4020801633017ae76a181e947e4087a7dc0426e3362c66257da9a04a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vitruvi_sdk-0.0.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 92ab79214308929ada60112dc9e086d5c4b45c4967a86ee716dc88af08aa27ed
MD5 cfc43f1a58f94fa331875c0bf792f46a
BLAKE2b-256 9e0054dbfc188452b4bdc3f840d2382f27498f0d0c82ee4fb9da443bcec85140

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