Skip to main content

Aspose.Barcode Cloud API Reference

Project description

Aspose.BarCode Cloud SDK for Python

License Python package PyPI

  • API version: 3.0
  • Package version: 21.9.0

Demo applications

Generate Barcode Recognize Barcode Embed Barcode
Generate Recognize Embed

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 2 or Python 3 applications quickly and easily.

Supported Python versions:

  • Python 2.7
  • Python 3.4+

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:

from __future__ import division, print_function

from pprint import pprint

import aspose_barcode_cloud
from aspose_barcode_cloud.rest import ApiException

# Configure OAuth2 access token for authorization: JWT
configuration = aspose_barcode_cloud.Configuration(
    client_id="Client Id from https://dashboard.aspose.cloud/applications",
    client_secret="Client Secret from https://dashboard.aspose.cloud/applications",
)

# create an instance of the API class
api = aspose_barcode_cloud.BarcodeApi(aspose_barcode_cloud.ApiClient(configuration))
type = aspose_barcode_cloud.EncodeBarcodeType.CODE128  # str | Type of barcode to generate.
text = 'text_example'  # str | Text to encode.

try:
    # Generate barcode.
    response = api.get_barcode_generate(type, text)
    with open("example.png", "wb") as f:
        f.write(response.data)
    print("Barcode saved to file 'example.png'")
except ApiException as e:
    print("Exception when calling BarcodeApi->get_barcode_generate: %s\n" % e)


# Recognize barcode
response = api.post_barcode_recognize_from_url_or_content(image="example.png",
                                                          preset=aspose_barcode_cloud.PresetType.HIGHPERFORMANCE)
pprint(response)

Requirements

  • six >= 1.10
  • urllib3 >= 1.15.1

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/v3.0

Class Method HTTP request Description
BarcodeApi get_barcode_generate GET /barcode/generate Generate barcode.
BarcodeApi get_barcode_recognize GET /barcode/{name}/recognize Recognize barcode from a file on server.
BarcodeApi post_barcode_recognize_from_url_or_content POST /barcode/recognize Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64.
BarcodeApi post_generate_multiple POST /barcode/generateMultiple Generate multiple barcodes and return in response stream
BarcodeApi put_barcode_generate_file PUT /barcode/{name}/generate Generate barcode and save on server (from query params or from file with json or xml content)
BarcodeApi put_barcode_recognize_from_body PUT /barcode/{name}/recognize Recognition of a barcode from file on server with parameters in body.
BarcodeApi put_generate_multiple PUT /barcode/{name}/generateMultiple Generate image with multiple barcodes and put new file on server
FileApi copy_file PUT /barcode/storage/file/copy/{srcPath} Copy file
FileApi delete_file DELETE /barcode/storage/file/{path} Delete file
FileApi download_file GET /barcode/storage/file/{path} Download file
FileApi move_file PUT /barcode/storage/file/move/{srcPath} Move file
FileApi upload_file PUT /barcode/storage/file/{path} Upload file
FolderApi copy_folder PUT /barcode/storage/folder/copy/{srcPath} Copy folder
FolderApi create_folder PUT /barcode/storage/folder/{path} Create the folder
FolderApi delete_folder DELETE /barcode/storage/folder/{path} Delete folder
FolderApi get_files_list GET /barcode/storage/folder/{path} Get all files and folders within a folder
FolderApi move_folder PUT /barcode/storage/folder/move/{srcPath} Move folder
StorageApi get_disc_usage GET /barcode/storage/disc Get disc usage
StorageApi get_file_versions GET /barcode/storage/version/{path} Get file versions
StorageApi object_exists GET /barcode/storage/exist/{path} Check if file or folder exists
StorageApi storage_exists GET /barcode/storage/{storageName}/exist Check if storage exists

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-21.9.0.tar.gz (75.2 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-21.9.0-py2.py3-none-any.whl (182.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aspose-barcode-cloud-21.9.0.tar.gz.

File metadata

  • Download URL: aspose-barcode-cloud-21.9.0.tar.gz
  • Upload date:
  • Size: 75.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for aspose-barcode-cloud-21.9.0.tar.gz
Algorithm Hash digest
SHA256 0f521d9dde7f2c7a4cdc9e2f18297fe025f40857791de098407e3e5099ad59d9
MD5 21ee9a0b2046e62cdfa2d9bcd878b984
BLAKE2b-256 a0b45b7ebe617cb6e7d2a01ad708c062c301cdcb1d16d4626f157e724daba175

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aspose_barcode_cloud-21.9.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 182.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for aspose_barcode_cloud-21.9.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a1028507d2d8ead5465da4da7b659f57bb760af4cbf229da84c990a31a0e68c6
MD5 8e1aad725feee1536ee446ae1edddee6
BLAKE2b-256 9e56a19aa26594b36bb8fd437bc93ff1fac32ef60542eaf407229e218c771584

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