Skip to main content

Aspose.BarCode Cloud SDK for Python

License Python package PyPI

  • API version: 4.0
  • Package version: 26.8.0

SDK and API Version Compatibility:

  • SDK Version 25.1 and Later: Starting from SDK version 25.1, all subsequent versions are compatible with API Version v4.0.
  • SDK Version 24.12 and Earlier: These versions are compatible with API Version v3.0.

Demo applications

Scan QR Generate Barcode Recognize Barcode
ScanQR Generate Recognize
Generate Wi-Fi QR Embed Barcode Scan Barcode
Wi-FiQR Embed Scan

Aspose.BarCode for Cloud is a REST API for Linear, 2D and postal barcode generation and recognition in the cloud. API recognizes and generates barcode images in a variety of formats. Barcode REST API allows to specify barcode image attributes like image width, height, border style and output image format in order to customize the generation process. Developers can also specify the barcode type and text attributes such as text location and font styles in order to suit the application requirements.

This repository contains Aspose.BarCode Cloud SDK for Python source code. This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Python 3 applications quickly and easily.

Supported Python versions:

  • Python 3.9+

To use these SDKs, you will need Client Id and Client Secret which can be looked up at Aspose Cloud Dashboard (free registration in Aspose Cloud is required for this).

How to use the SDK

The complete source code is available in this repository folder. You can either directly use it in your project via source code or get from PyPi (recommended).

AI Agent Skills

This repository includes an AI-agent skill in skills/generate-and-scan-barcode-python/SKILL.md. Point your coding agent to it when working with this SDK so it follows the repo workflow and SDK-specific API patterns.

Prerequisites

To use Aspose.BarCode Cloud SDK for Python you need to register an account with Aspose Cloud and lookup/create Client Secret and Client Id at Cloud Dashboard. There is free quota available. For more details, see Aspose Cloud Pricing.

Installation

Install aspose-barcode-cloud via pip

From the command line:

pip install aspose-barcode-cloud

Then import the package:

import aspose_barcode_cloud

Sample usage

The examples below show how you can generate and recognize Code128 barcode and save it into local file using aspose-barcode-cloud:

import os
from pprint import pprint

from aspose_barcode_cloud import (
    GenerateApi,
    RecognizeApi,
    ApiClient,
    Configuration,
    EncodeBarcodeType,
    CodeLocation,
    DecodeBarcodeType,
    BarcodeImageParams,
    QrParams,
    QREncodeMode,
    QRErrorLevel,
    QRVersion,
)

config = Configuration(
    client_id="Client Id from https://dashboard.aspose.cloud/applications",
    client_secret="Client Secret from https://dashboard.aspose.cloud/applications",
    access_token=os.environ.get("TEST_CONFIGURATION_ACCESS_TOKEN"),  # Only for testing in CI, remove this line
)

# Generate barcode
generateApi = GenerateApi(ApiClient(config))
response = generateApi.generate(
    EncodeBarcodeType.QR,
    "Example",
    barcode_image_params=BarcodeImageParams(text_location=CodeLocation.NONE),
    qr_params=QrParams(
        qr_encode_mode=QREncodeMode.AUTO,
        qr_error_level=QRErrorLevel.LEVELM,
        qr_version=QRVersion.AUTO,
        qr_aspect_ratio=0.75,
    ),
)
with open("example.png", "wb") as f:
    f.write(response.data)
print("Barcode saved to file 'example.png'")

# Recognize barcode
recognizeApi = RecognizeApi(ApiClient(config))
response = recognizeApi.recognize_multipart(DecodeBarcodeType.QR, open("example.png", "rb"))
pprint(response)

Requirements

  • urllib3 >= 1.21.1, <2.0

Licensing

All Aspose.BarCode for Cloud SDKs, helper scripts and templates are licensed under MIT License.

Resources

Documentation for API Endpoints

All URIs are relative to https://api.aspose.cloud/v4.0

Class Method HTTP request Description
GenerateApi generate GET /barcode/generate/{barcodeType} Generate a barcode using a GET request with parameters in the route and query string.
GenerateApi generate_body POST /barcode/generate-body Generate a barcode using a POST request with parameters in the request body in JSON or XML format.
GenerateApi generate_multipart POST /barcode/generate-multipart Generate a barcode using a POST request with parameters in a multipart form.
RecognizeApi recognize GET /barcode/recognize Recognize a barcode from a file on an Internet server using a GET request with a query string parameter. For recognizing files from your hard drive, use `recognize-body` or `recognize-multipart` endpoints instead.
RecognizeApi recognize_base64 POST /barcode/recognize-body Recognize a barcode from a file in the request body using a POST request with JSON or XML body parameters.
RecognizeApi recognize_multipart POST /barcode/recognize-multipart Recognize a barcode from a file in the request body using a POST request with multipart form parameters.
ScanApi scan GET /barcode/scan Scan a barcode from a file on an Internet server using a GET request with a query string parameter. For scanning files from your hard drive, use `scan-body` or `scan-multipart` endpoints instead.
ScanApi scan_base64 POST /barcode/scan-body Scan a barcode from a file in the request body using a POST request with a JSON or XML body parameter.
ScanApi scan_multipart POST /barcode/scan-multipart Scan a barcode from a file in the request body using a POST request with a multipart form parameter.

Documentation For Models

Release files for aspose-barcode-cloud 26.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aspose-barcode-cloud 26.8.0
File Size Uploaded
aspose_barcode_cloud-26.8.0.tar.gz 47.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aspose-barcode-cloud 26.8.0
File Interpreter ABI Platform
aspose_barcode_cloud-26.8.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 115.2 kB

Release files / aspose_barcode_cloud-26.8.0.tar.gz

Download URL aspose_barcode_cloud-26.8.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c9eaa0602a79debc502c0c239411324facc279fd4d588c07d6466be5d43a8433
BLAKE2b-256 checksum
How to use checksums
5d11a2bbc2a670078bb3f610742e25ee18665e5abcf6ced51927bce73aff6954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / aspose_barcode_cloud-26.8.0-py2.py3-none-any.whl

Download URL aspose_barcode_cloud-26.8.0-py2.py3-none-any.whl
Size 67.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ddce0ba546fad220970147d26191006ee62ec9276002638651817d38b2dd7eb1
BLAKE2b-256 checksum
How to use checksums
084a7af5f586a6ac771cdf92762b84b40c7908eb52b50bbeac8faaa3e3a26fa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

26.9.0

2 release files

This release

26.8.0 This release

2 release files

26.7.0

2 release files

26.6.0

2 release files

26.5.0

2 release files

26.4.0

2 release files

26.3.0

2 release files

26.2.0

2 release files

26.1.0

2 release files

25.9.0

2 release files

25.8.0

2 release files

25.7.0

2 release files

25.6.0

2 release files

25.5.0

2 release files

25.4.0

2 release files

25.3.0

2 release files

25.2.0

2 release files

25.1.0

2 release files

24.9.0

2 release files

24.8.0

2 release files

24.7.0

2 release files

24.6.0

2 release files

24.5.0

2 release files

24.4.0

2 release files

24.3.0

2 release files

24.2.0

2 release files

24.1.0

2 release files

23.9.0

2 release files

23.8.0

2 release files

23.7.0

2 release files

23.6.0

2 release files

23.5.0

2 release files

23.4.0

2 release files

23.3.0

2 release files

23.2.0

2 release files

23.1.0

2 release files

22.9.0

2 release files

22.8.0

2 release files

22.7.0

2 release files

22.3.0

2 release files

21.9.0

2 release files

21.7.0

2 release files

21.6.0

2 release files

21.3.0

2 release files

20.6.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page