--- id: pyxero version: "0.9.5" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # pyxero — Python API for accessing the REST API of the Xero accounting tool. License: permissive · Maintenance: active · Downloads: 318.0K/mo ## What it is and what it does PyXero is a Python wrapper around Xero's REST API that handles authentication and request mechanics. It supports both OAuth2 (for apps that can keep secrets) and PKCE (for mobile, desktop, or single-page apps), managing token expiry and refresh automatically. The library abstracts Xero's accounting resources into Python objects you can query. You register your app with Xero, obtain credentials, and use PyXero to authenticate users and make API calls on their behalf. The library handles scope management, multi-tenant support for users with access to multiple Xero organizations, and token lifecycle. It's built on requests, requests-oauthlib, python-dateutil, PyJWT, and cryptography. Use it for: - Integrate Xero accounting data into your application without storing user passwords. - Build automated workflows that read and write accounting data back to Xero. - Create desktop or mobile tools that access Xero without embedding a client secret. - Sync customer and transaction data from Xero into your own database. - Connect Xero accounting to a larger business intelligence or reporting pipeline. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyXero is a Python client library for the Xero accounting REST API, supporting OAuth2 and PKCE authentication flows. Yes. PyXero is actively maintained, has no known vulnerabilities, supports current Python versions 3.9–3.14, and uses a permissive BSD-3-Clause license. Install friction is low. It is the standard choice for Python developers integrating with Xero's API. ## Install pip install pyxero uv add pyxero poetry add pyxero ## Installing pyxero Before you install: Low install friction with a pure Python wheel and five well-established runtime dependencies. The package is actively maintained with recent commits and supports modern Python versions 3.9 through 3.14. License in practice: BSD-3-Clause is a permissive license allowing commercial and private use with minimal restrictions, making it safe for most projects. Quickstart: pip install pyxero from pyxero.auth import OAuth2Credentials credentials = OAuth2Credentials(client_id, client_secret, callback_uri=callback_uri) authorisation_url = credentials.generate_url() credentials.verify(request_uri) contacts = credentials.get_tenants() Requires a registered Xero app with Client ID and Client Secret; OAuth2 tokens expire after 30 minutes and must be refreshed for extended use. Verify before relying: - Whether the package handles all current Xero API endpoints or if some are missing or outdated. - Performance characteristics when querying large datasets or making many concurrent requests. - Completeness of error handling and recovery for network failures or API rate limits. - Full scope of accounting resources accessible through the library beyond what the excerpt demonstrates. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 318.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags xero api client python, xero accounting integration, oauth2 xero authentication, xero python wrapper, accounting api client, xero rest api, xero oauth2 client, accounting-api, oauth2-client, xero-integration [View on SkillFed](https://skillfed.io/packages/pyxero) · [View on PyPI](https://pypi.org/project/pyxero/)