{"repo":"square/square-python-sdk","free":true,"listed":false,"github":"https://github.com/square/square-python-sdk","clone":"git clone https://github.com/square/square-python-sdk.git","description":"Python client library for the Square API","language":"Python","stars":114,"topics":["python-sdk","ecommerce","sdk","payment-processing","credit-card-payments","api-client","api"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Square Python Library The Square Python library provides convenient access to the Square API from Python. Installation Requirements Use of the Square Python SDK requires: Python 3.8+ Usage Instantiate and use the client with the following: Async Client The SDK also exports an async client so that you can make non-blocking calls to our API. Legacy SDK While the new SDK has a lot of improvements, we at Square understand that it takes time to upgrade when there are breaking changes. To make the migration easier, the old SDK is published as squareup legacy so that the two SDKs can be used side-by-side in the same project. Check out the example for a full demonstration, but the gist is shown below: We recommend migrating to the new SDK using the following steps: 1. Upgrade the PyPi package to ^42.0.0 2. Run pip install squareup legacy 3. Search and replace all requires and imports from square to square legacy 4. Gradually move over to use the new SDK by importing it from the square module Versioning By default, the SDK is pinned to the latest version. If you would like to override this version you can specify it like so: Automatic Pagination Paginated requests will return a SyncPager or AsyncPager , which can be used as generators for the underlying object. File Uploads Files are uploaded with the File type, which is constructed as a tuple in a variety of formats. You can customize the filename and Content-Type of the individual multipart/form-data part like so: Exception Handling","default_branch":null,"files":null,"tree":[],"storefront":"/r/square","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/square/square-python-sdk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}