Skip to main content

Brivio SDK for Python

Official Python client for the Brivio API — invoicing, e-Factura, contacts, articles and more, for the Romanian market.

pip install brivio

Quick start

from brivio import Brivio

client = Brivio(api_key="brivio_sk_live_…")

# Verify the key and see which organization it belongs to.
print(client.me())

# One page, with pagination metadata.
page = client.contacts.list(search="srl")
print(f"{len(page)} of {page.total} contacts")

# Or walk every page lazily — no manual page arithmetic.
for contact in client.contacts.iterate(search="srl"):
    print(contact["name"])

Invoicing

invoice = client.invoices.create(
    {
        "contactId": "ct_123",
        "currency": "RON",
        "lines": [{"description": "Consultanță", "quantity": 1, "unitPrice": 1000, "vatRate": 21}],
    },
    # Safe to retry: the same key never creates a second invoice.
    idempotency_key="order-42",
)

client.invoices.send(invoice["id"])
client.invoices.submit_efactura(invoice["id"])
print(client.invoices.efactura_status(invoice["id"]))

Errors

Every failure raises BrivioError:

from brivio import Brivio, BrivioError

try:
    client.contacts.create({})
except BrivioError as err:
    print(err.code)     # "VALIDATION_ERROR"
    print(err.status)   # 422
    print(err.details)  # {"name": ["required"]}

status == 0 means the request never reached the API (DNS, connection reset, timeout) rather than the API rejecting it.

Retries and timeouts

Transient failures (429, 502, 503, 504, network errors) are retried automatically — twice by default — with exponential backoff plus jitter, and Retry-After is honoured on 429. Other 4xx responses are not retried: they fail identically every time.

client = Brivio(
    api_key="…",
    max_retries=5,   # 0 disables
    timeout=10.0,    # seconds; 0 disables
    base_url="https://api.brivio.ro/v1",
)

Endpoints without a helper

The typed resources cover the common surface. Anything else is one call away and still gets retries, error mapping and envelope unwrapping:

zones = client.request("GET", "/dns/zones")

Typed models

Generated Pydantic models for every schema in the API live under brivio._generated.models:

from brivio._generated.models.contact import Contact

contact = Contact.from_dict(client.contacts.get("ct_123"))
print(contact.name)

How this SDK is built

Models and operation signatures are generated from the published OpenAPI spec; the transport (retries, errors, pagination, idempotency) is hand-written so every official Brivio SDK behaves identically. See SDK_CONTRACT.md.

MIT © Brivio

Metadata

Release files for brivio 0.1.0

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

Source distribution (sdist)

Source distribution for brivio 0.1.0
File Size Uploaded Provenance Actions
brivio-0.1.0.tar.gz 129.2 kB With provenance Details for brivio-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brivio 0.1.0
File Interpreter ABI Platform Actions
brivio-0.1.0-py3-none-any.whl Python 3 none any Details for brivio-0.1.0-py3-none-any.whl

Total release size: 459.4 kB

Release files / brivio-0.1.0.tar.gz

Download URL brivio-0.1.0.tar.gz
Size 129.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1d0ad561b64e99576e97e4e177f32509f049e22bf1f3104af6f0d2f795374f93
BLAKE2b-256 checksum
How to use checksums
161653dc5cf0d9ba08ad61aa3ec1fe626532c746b7ec2ef7797f96666fdfe5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

Release files / brivio-0.1.0-py3-none-any.whl

Download URL brivio-0.1.0-py3-none-any.whl
Size 330.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1d162a44dfd257c9c6397dbe7b0050bf9c4e928010e7ad6a7f5b1abef63c288
BLAKE2b-256 checksum
How to use checksums
81901e7e4c7551391da93448717ed561561d6e483cf3534461da3089dc37174d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 26, 2026.

Transparency log

Security for brivio 0.1.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for brivio-0.1.0.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 Sep 26, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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