Skip to main content

Runtime loader for Virtuous Python clients

Project description

Using Virtuous in Python

Zero-dependency loader for Virtuous runtime-generated Python clients.

Install

pip install virtuous

Usage

from virtuous import load_module, load_module_to_disk, get_remote_hash

module = load_module("https://api.example.com/client.gen.py")
client = module.create_client("https://api.example.com")

# Optional: write to disk and import later
module = load_module_to_disk(
    "https://api.example.com/client.gen.py",
    "/tmp/client.gen.py",
)

# Optional: fetch the server-provided hash
remote_hash = get_remote_hash("https://api.example.com/client.gen.py")

Notes

  • This loader executes remote Python code. Use trusted endpoints only.
  • get_remote_hash reads from <url>.sha256.
  • Loaded modules expose __virtuous_hash__ with the computed SHA-256 digest.

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

virtuous-0.0.7.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

virtuous-0.0.7-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file virtuous-0.0.7.tar.gz.

File metadata

  • Download URL: virtuous-0.0.7.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for virtuous-0.0.7.tar.gz
Algorithm Hash digest
SHA256 6743509749832a39cf10de2230a9c98efc2da8af32a282cbbe75ee21846eb0b0
MD5 8041cd90044c87a2b8a745b3471201f7
BLAKE2b-256 59b67e3fff241deac63ed2141ed9c3e21d1830632749d9f82162ea1b559b2661

See more details on using hashes here.

File details

Details for the file virtuous-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: virtuous-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for virtuous-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a9b8f9a7462e1beb1968e225f817768033ca1074b945ae9685a49404463c4af8
MD5 b920646ca28b6cd5040f3e300d091722
BLAKE2b-256 de8c93e2791dcb6731541a42780d65bf8df6bdb1cc03285e47dba8a71e71821e

See more details on using hashes here.

Supported by

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