Skip to main content

VYLTH Console SDK — Entitlements & billing enforcement

Project description

console-vylth

VYLTH Console SDK for Python — entitlements and billing enforcement for FastAPI services.

Install

pip install console-vylth

# With FastAPI support
pip install "console-vylth[fastapi]"

Usage

from console_vylth import ConsoleClient

console = ConsoleClient()

# Fetch entitlements
ent = await console.get_entitlements(user_id, access_token)

# Check ecosystem access
if not ent.has_ecosystem("alpha"):
    raise HTTPException(status_code=403, detail="No access")

# Record usage (fire and forget)
await console.record_usage(user_id, product="alpha", strategy="sol-arb", call_count=1)

FastAPI dependency

from console_vylth import ConsoleClient

console = ConsoleClient()

@app.get("/strategies")
async def list_strategies(
    ent = Depends(console.fastapi_dependency(ecosystem="alpha"))
):
    ...

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

console_vylth-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

console_vylth-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file console_vylth-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for console_vylth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c4cf86eaf1e4107ba8041b0b90177da923b66950748721a7ef58b0c43b6dbb30
MD5 cc6b7002c7bbd6f83259b5e8e508bf06
BLAKE2b-256 2b188d12e77438691f45a994bbf9100058996ce308409b8a02184d021cf859be

See more details on using hashes here.

File details

Details for the file console_vylth-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for console_vylth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30851f3ef57cb4881e9abade0a189ce52cc9ca56df9cd8be0aea4173dc030610
MD5 9655db6109451dcaf8b12a1d26b010ea
BLAKE2b-256 c20b90ad2a699d6a382ecdc38086477f2f5e46024284a1da78e1a18b8df7b1f5

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