Skip to main content

Modern Python SDK for Pagar.me API v5

Project description

Pagar.me Python SDK

Python Version Ruff

Modern Python SDK for integration with the Pagar.me payment gateway (v5).

Features

  • Asynchronous: Built on httpx for high-performance async calls.
  • Type-safe: Powered by Pydantic v2 for data validation and IDE support.
  • Complete: Support for Customers, Cards, Orders, Charges, and more.

Installation

# Using uv
uv add pagarme-python-sdk

# Using pip
pip install pagarme-python-sdk

Quick Start

import asyncio
from pagarme_py import PagarMeClient

async def main():
    async with PagarMeClient(api_key="sk_test_...") as client:
        # Create a customer
        customer = await client.customers.create({
            "name": "Tony Stark",
            "email": "tony@stark.com",
            "document": "12345678909",
            "type": "individual"
        })
        print(f"Created customer: {customer.id}")

if __name__ == "__main__":
    asyncio.run(main())

Technologies

  • Python 3.13+
  • uv for package and virtual environment management
  • Pydantic v2 for data validation
  • HTTPX for asynchronous requests
  • Ruff, Pyright, isort for code quality
  • Pytest for automated tests

Development

To install development dependencies:

uv sync --all-extras

Refer to .junie/guidelines.md for contribution guidelines.

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

pagarme_python_sdk-0.1.0.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

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

pagarme_python_sdk-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pagarme_python_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pagarme_python_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c4ffcd363142f42cbeb865becc8ae042ea77c69d8b1186ecfe9a1598041775c6
MD5 3071b36ce9ac1fdc980d1c95ba9defd1
BLAKE2b-256 eea3f966c870e89e7784a43843cd137121aaccb1bb02ede31d84c0748f3a4456

See more details on using hashes here.

Provenance

The following attestation bundles were made for pagarme_python_sdk-0.1.0.tar.gz:

Publisher: publish.yml on ramon/pagarme-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for pagarme_python_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 798c9fe7c98702a96bdfba08ea17fc1093d1322fc7fbf56e301f136200c4612d
MD5 db9d5cbe980b38648b290d1118df3275
BLAKE2b-256 09892d0c592cf03694878a9b3ad089dcbee204c0a501aa9c940e81880d65324f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pagarme_python_sdk-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ramon/pagarme-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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