Skip to main content

Aspose.BarCode Cloud SDK for Python

License Python package PyPI

  • API version: 4.0
  • Package version: 26.10.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

Metadata

Release files for aspose-barcode-cloud 26.10.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.10.0
File Size Uploaded Provenance Actions
aspose_barcode_cloud-26.10.0.tar.gz 47.4 kB With provenance Details for aspose_barcode_cloud-26.10.0.tar.gz

Built distribution (wheel)

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

Total release size: 115.2 kB

Release files / aspose_barcode_cloud-26.10.0.tar.gz

Download URL aspose_barcode_cloud-26.10.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b4017ceeb9f743e61dcaed6bc12121ae75dd60e07d5732127881fc3d5b330492
BLAKE2b-256 checksum
How to use checksums
03d944b52517bac74f777db8f4942b349d6c0260d4ced66f519837f59c3a27ff
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 Oct 19, 2026.

Transparency log

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

Download URL aspose_barcode_cloud-26.10.0-py2.py3-none-any.whl
Size 67.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2c036ba155831c126ab53ef190e191a5b2667a400d5e9926e6278e5796ee6b75
BLAKE2b-256 checksum
How to use checksums
4da524e38721ec2444ebe354f197d570cb38e9f2c98ae991dd2232dea9275411
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 Oct 19, 2026.

Transparency log

Security for aspose-barcode-cloud 26.10.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aspose_barcode_cloud-26.10.0.tar.gz

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 Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

26.10.0 This release

2 release files Full provenance

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