Skip to main content

Peráta SDK para Python

SDK oficial da API da Peráta para Python 3.11+, sem dependências. É gerado a partir do contrato da API (openapi.json, na raiz de perata-sh/sdk) por generator/. Não edite os arquivos desta pasta: regenere.

pip install perata-sdk
import os
from perata import Perata

perata = Perata(os.environ["PERATA_API_KEY"])  # prk_test_… ou prk_live_…

product = perata.products.create({"name": "Curso"}, idempotency_key="produto-curso")

for product in perata.products.list_iter():
    print(product.name)

Recursos

Serviço Métodos
perata.checkouts create
perata.customers create, get, list, list_iter
perata.orders list, list_iter
perata.payment_methods detach, list, list_iter
perata.payments get, list, list_iter
perata.prices create, list, list_iter
perata.products create, get, list, list_iter
perata.refunds create
perata.subscriptions cancel, get, list, list_iter

As escritas aceitam idempotency_key=, e todas aceitam api_key= para usar a chave de outra organização numa chamada.

Erros

Uma recusa da API levanta PerataError, com status, code (invalid_request, not_found…), fields (o problema de cada campo) e, num 429, retry_after em segundos.

Webhooks

from perata import verify_webhook

event = verify_webhook(os.environ["PERATA_WEBHOOK_SECRET"], request.headers, request.get_data())

A assinatura é a do Standard Webhooks (webhook-id, webhook-timestamp, webhook-signature), com tolerância de 5 minutos. Passe o corpo cru, antes de interpretar.

Versão do SDK: 0.1.1 · contrato da API: 0.1.0

Metadata

Release files for perata-sdk 0.1.1

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

Source distribution (sdist)

Source distribution for perata-sdk 0.1.1
File Size Uploaded Provenance
perata_sdk-0.1.1.tar.gz 9.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for perata-sdk 0.1.1
File Interpreter ABI Platform
perata_sdk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.2 kB

Release files / perata_sdk-0.1.1.tar.gz

Download URL perata_sdk-0.1.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
64022df986cd5759c1add5a2d6b0199e0a518b4325a50bbab9fa7250769a4c97
BLAKE2b-256 checksum
How to use checksums
654e8c2c9c7ef365a2e80b3e0aaf4c738b00a386750fc1f72b5d43e6d72a74ae
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 Oct 18, 2026.

Transparency log

Release files / perata_sdk-0.1.1-py3-none-any.whl

Download URL perata_sdk-0.1.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4876d221c7a96e9a5cb262e19d03db2d654a911a2794e4d444650656aa0032fe
BLAKE2b-256 checksum
How to use checksums
b6de40433f99fd8c3fa216018052cf16acc69595fe8aa64e3ee0199d203c5a75
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 Oct 18, 2026.

Transparency log

Security for perata-sdk 0.1.1

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 perata_sdk-0.1.1.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 Oct 18, 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.1 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