Skip to main content

Aspose.BarCode.Cloud v4.0 Specification

Project description

Aspose.BarCode Cloud SDK for Python

License Python package PyPI

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

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,
)

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", text_location=CodeLocation.NONE)
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 barcode using GET request with parameters in route and query string.
GenerateApi generate_body POST /barcode/generate-body Generate barcode using POST request with parameters in body in json or xml format.
GenerateApi generate_multipart POST /barcode/generate-multipart Generate barcode using POST request with parameters in multipart form.
RecognizeApi recognize GET /barcode/recognize Recognize barcode from file on server in the Internet using GET requests with parameter in query string. For recognizing files from your hard drive use `recognize-body` or `recognize-multipart` endpoints instead.
RecognizeApi recognize_base64 POST /barcode/recognize-body Recognize barcode from file in request body using POST requests with parameters in body in json or xml format.
RecognizeApi recognize_multipart POST /barcode/recognize-multipart Recognize barcode from file in request body using POST requests with parameters in multipart form.
ScanApi scan GET /barcode/scan Scan barcode from file on server in the Internet using GET requests with parameter in query string. For scaning files from your hard drive use `scan-body` or `scan-multipart` endpoints instead.
ScanApi scan_base64 POST /barcode/scan-body Scan barcode from file in request body using POST requests with parameter in body in json or xml format.
ScanApi scan_multipart POST /barcode/scan-multipart Scan barcode from file in request body using POST requests with parameter in multipart form.

Documentation For Models

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aspose_barcode_cloud-26.2.0.tar.gz (36.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aspose_barcode_cloud-26.2.0-py2.py3-none-any.whl (52.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aspose_barcode_cloud-26.2.0.tar.gz.

File metadata

  • Download URL: aspose_barcode_cloud-26.2.0.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for aspose_barcode_cloud-26.2.0.tar.gz
Algorithm Hash digest
SHA256 b1217d0b3091beab12beb9a03c5cc8451fb03c845bfcbd07bf514ad3723cccb5
MD5 6b76f15e1b0110a00102cb95212454ba
BLAKE2b-256 ac645350ba435c55dff6c3496f505271d3e8e3adf700c433f07846eb79625497

See more details on using hashes here.

File details

Details for the file aspose_barcode_cloud-26.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for aspose_barcode_cloud-26.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2bc1cdfcfb23c34319208d9bb345e1807708171695ea89b62c2edbab5d7627bd
MD5 dca28644c4055d907b3e965897631f7d
BLAKE2b-256 de155667980bcb17ec29c62f57f4efdcb5c6be84775a2b9c4a967262f98195c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page