--- id: xero-python version: "15.1.0" license: MIT license license_treatment: permissive maintenance: active --- # xero-python — Official Python sdk for Xero API generated by OpenAPI spec for oAuth2 License: permissive · Maintenance: active · Downloads: 326.4K/mo ## What it is and what it does xero-python is the official SDK for integrating Xero's cloud accounting platform with Python applications. It wraps Xero's REST APIs—Accounting, Assets, Projects, Payroll (AU/UK/NZ), and Files—into Python client classes, handling OAuth 2.0 authentication and request serialization automatically. Developers use it to build integrations that read invoices, contacts, and ledger data, or write transactions and payroll records, without manually constructing HTTP requests or managing tokens. The SDK is generated from OpenAPI specifications and requires no runtime dependencies, but installation reports high friction. It supports Python 3.5 and later and is actively maintained. Setup involves creating a Xero developer account, registering an API application, and configuring OAuth 2.0 credentials. The package handles token persistence and refresh transparently, making it suitable for web applications (especially Flask-based ones, as shown in the documentation) and server-side integrations with small business accounting workflows. Use it for: - Build a web app that syncs Xero invoices and contacts into a custom CRM or billing system. - Automate payroll record creation or retrieval for AU, UK, or NZ organizations using Xero Payroll. - Extract accounting reports and journal entries from Xero for custom financial analysis or auditing. - Integrate Xero file storage with document management workflows in a larger application. - Create a project tracking dashboard that pulls time and cost data from Xero Projects. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python bindings to Xero's accounting, payroll, assets, projects, and files APIs, allowing developers to read and write small business accounting data programmatically. Yes, with conditions. The package is actively maintained, has no known vulnerabilities, and is the official Xero SDK—making it the right choice for any Xero integration in Python. However, high install friction suggests you should test installation in your target environment early. The Beta status and requirement for OAuth 2.0 setup mean it's best suited for developers comfortable with API authentication flows and Xero's platform. ## Install pip install xero-python uv add xero-python poetry add xero-python ## Installing xero-python Before you install: High install friction reported. Package is actively maintained (latest release 4 days ago) and supports current Python versions, but the friction signal suggests potential build or dependency resolution challenges during installation. License in practice: MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package provided you include the license notice. Quickstart: pip install xero-python from xero_python.accounting import AccountingApi from xero_python.api_client import ApiClient, Configuration from xero_python.api_client.oauth2 import OAuth2Token api_client = ApiClient( Configuration( oauth2_token=OAuth2Token( client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET" ) ) ) accounting_api = AccountingApi(api_client) Requires a Xero developer account with API credentials (client ID and secret) and OAuth 2.0 token setup; API calls require valid access tokens obtained through Xero's authorization flow. Verify before relying: - Whether high install friction is due to compiled dependencies, large package size, or complex transitive requirements. - Current test coverage and stability track record beyond the 'Beta' development status classifier. - Performance characteristics when handling large volumes of accounting transactions or payroll records. ## Package facts - License: MIT license (permissive) - Python support: supports_current - Install friction: high - Maintenance: active - Downloads: 326.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags xero api python sdk, accounting api client python, xero oauth2 integration, small business accounting python, xero invoices contacts python, payroll api python, xero financial data access, accounting-api, oauth2, small-business [View on SkillFed](https://skillfed.io/packages/xero-python) · [View on PyPI](https://pypi.org/project/xero-python/)