Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Vatly Fluent for Python

Alpha — under active development. Every alpha release may include breaking changes. Pin exact versions during alpha.

Integrate billing with Vatly, the European Merchant of Record for AI, software and digital products, without tying your application to a framework or database. Fluent adds chainable checkout/subscription builders, customer and subscription handles, pluggable persistence, and a signed webhook-to-domain-event pipeline on top of vatly-api-python. Your application owns authentication, entitlements, storage, transactions and jobs. Python 3.10+, fully typed, async-first.

Install

pip install vatly-fluent-python==0.1.0a2 vatly-api-python==0.1.0a2

For development, run .agents/setup or uv sync --locked. Both development and package metadata use the exact SDK version from PyPI.

First checkout

from vatly import AsyncVatlyClient, RequestOptions
from vatly_fluent import Vatly, Wiring


async def start_subscription(plan_id: str, purchase_id: str):
    async with AsyncVatlyClient() as api:  # reads VATLY_API_KEY
        vatly = Vatly(
            Wiring(
                api=api,
                redirect_url_success="https://app.example.com/billing/return",
                redirect_url_canceled="https://app.example.com/billing/canceled",
            )
        )
        checkout = await (
            vatly.subscribe()
            .to_plan(plan_id)
            .with_quantity(3)
            .with_trial_days(14)
            .with_metadata({"purchaseId": purchase_id})
            .create(options=RequestOptions(idempotency_key=f"subscribe:{purchase_id}"))
        )
        return checkout.get_url()

This creates a checkout, not a subscription. Confirm payment through signed webhooks, not redirects. No API calls happen until create(). Use a new builder per purchase and persist a stable operation ID before sending. SDK errors pass through unchanged; FluentError means invalid local input or missing wiring.

Connect your own entities and storage

Wire CheckoutRecords, Repository[LocalSubscription], Repository[Stored[Order]], and WebhookCalls to your application's database. For entity-linked checkouts:

from vatly_fluent import EntityRef

# In an authorized handler, with vatly.wiring.checkouts configured:
builder = vatly.subscribe().to_plan(plan_id).for_entity(EntityRef("team", team_id))

Ownership follows your stored checkout → order → subscription links. It never falls back to customerId, which is only billing identity and may be shared or null. Metadata is correlation data, not authorization. A signed webhook authenticates Vatly's snapshot; it does not authorize a browser-provided entity ID.

Linkage follows each order line's relatedResources.subscriptionId, which names the signup's subscription on the initial order, and productType="subscription" renewal lines. subscription_plan product IDs remain plan references. A signed order.paid snapshot can carry a null subscriptionId; reconcile the checkout to read the current order. See Subscriptions. Fluent never guesses a subscription from a customer, plan or quantity.

Learn the integration

Develop

See the development guide for setup and contributor checks.

uv sync --locked
uv run ruff check .
uv run ruff format --check .
uv run mypy
uv run pytest
uv build
uv run twine check dist/*
uv run python scripts/check_package.py

CI runs these checks across Python 3.10–3.14. Release workflows are prepared but require PyPI trusted-publisher configuration and an explicitly published GitHub release. No release is triggered by pushing main.

Metadata

Release files for vatly-fluent-python 0.1.0a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vatly-fluent-python 0.1.0a3
File Size Uploaded Provenance Actions
vatly_fluent_python-0.1.0a3.tar.gz 35.3 kB With provenance Details for vatly_fluent_python-0.1.0a3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vatly-fluent-python 0.1.0a3
File Interpreter ABI Platform Actions
vatly_fluent_python-0.1.0a3-py3-none-any.whl Python 3 none any Details for vatly_fluent_python-0.1.0a3-py3-none-any.whl

Total release size: 52.3 kB

Release files / vatly_fluent_python-0.1.0a3.tar.gz

Download URL vatly_fluent_python-0.1.0a3.tar.gz
Size 35.3 kB
Tags Source
SHA-256 checksum
How to use checksums
974dc0eb8cfd4c2ae34a48cc01490605833ce90ceedaaf9313f39aae90e12948
BLAKE2b-256 checksum
How to use checksums
cd87f56b409b5a06b643856faa3070ec6c86f13226d92e309b86202b322d5e34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / vatly_fluent_python-0.1.0a3-py3-none-any.whl

Download URL vatly_fluent_python-0.1.0a3-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c15f0e0cc82b02c4af0fbfd4aad08afc9fa4512ff56ecdea33e5128fb62d210
BLAKE2b-256 checksum
How to use checksums
e873c141c0a21c1109afab4c1c3f55b4578e066076c5766bfaba4ba908e624ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for vatly-fluent-python 0.1.0a3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vatly_fluent_python-0.1.0a3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page