squareup
What it is and what it does
The squareup library is an official SDK that wraps the Square API, allowing developers to integrate payment processing, customer management, invoicing, and reporting into Python applications. It provides both synchronous and asynchronous clients built on httpx and pydantic, with automatic retries, pagination helpers, and utility functions for webhook verification and reporting queries.
The library handles authentication via API tokens, supports versioned API endpoints, and includes helpers for complex workflows like the Reporting API's polling-based query pattern. It's actively maintained and supports Python 3.8 through 3.15, making it suitable for modern production applications that need to interact with Square's merchant services.
Use it for:
- Build a payment processing integration for an e-commerce platform using the synchronous client with idempotency keys.
- Implement webhook handlers to listen for Square events and verify their authenticity using provided utilities.
- Query aggregated business metrics via the Reporting API using helpers to poll for asynchronous query results.
- Manage customer records, invoices, and file uploads through the SDK's multipart file support.
- Scale payment operations with the async client to handle concurrent requests without blocking.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python client library for accessing the Square API, enabling payment processing, customer management, and business operations through synchronous and asynchronous interfaces.
Yes. The library is actively maintained, has no known vulnerabilities, installs with low friction, and is MIT-licensed. It supports Python 3.8 through 3.15 and provides both sync and async interfaces. Install it if you need to integrate Square payments or business operations into a Python application.
Install
squareup on PyPI
pip
pip install squareupuv
uv add squareuppoetry
poetry add squareupInstalling squareup
Before you install
Low install friction with a pure-wheel distribution. Actively maintained with a recent release (31 days old) and an active repository. Depends on well-established libraries (httpx, pydantic, typing_extensions).
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without licensing concerns.
Quickstart
pip install squareup
from square import Square
import os
client = Square(token=os.environ.get("SQUARE_TOKEN"))
client.payments.create(
source_id="ccof:GaJGNaZa8x4OgDJn4GB",
idempotency_key="7b0f3ec5-086a-4871-8f13-3c81b3875218",
amount_money={"amount": 1000, "currency": "USD"},
customer_id="W92WH6P11H4Z77CTET0RNTGFW8"
)
Requires Python 3.8 or later and a valid Square API token (typically passed via environment variable).
Verify before relying
- Whether the SDK's automatic retry behavior (default 2 attempts on 408/429/5XX) is appropriate for your use case.
- Performance characteristics and rate-limit handling under high-volume payment processing.
- Webhook signature verification implementation details and security guarantees.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — httpx, pydantic, pydantic-core, typing_extensions |
| Maintenance | actively maintained — 31 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 474,648/month — #6,453 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: squareup-45.0.1.20260715-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
forex-pythonFetches current and historical foreign exchange…
permissive · top 15,000 on PyPI
vapi-server-sdkA Python SDK for the Vapi API, providing…
unclear · top 15,000 on PyPI
pipedreamProvides a Python client library for accessing…
unclear · top 15,000 on PyPI
groundxA Python client library for the GroundX API…
permissive · top 15,000 on PyPI
auth0-pythonProvides Python bindings to Auth0's…
permissive · top 5,000 on PyPI
python-intercomA Python client library for the Intercom API,…
unclear · top 15,000 on PyPI
pycoingeckoPython wrapper around the CoinGecko API (v3)…
permissive · top 15,000 on PyPI
hellosign-python-sdkA Python wrapper for the HelloSign API that…
permissive · top 15,000 on PyPI