Developer Guide
Aspose.BarCode FOSS for Python is an open-source, MIT-licensed library for generating standards-compliant 1D and 2D barcodes in pure Python. The library supports seven symbologies (Code 128, Code 39, EAN-13, EAN-8, QR Code, UPC-A, UPC-E) with SVG and PNG output.
This Developer Guide covers per-symbology encode options, rendering controls, barcode generation architecture, and production usage patterns.
What You Will Find in This Section
Features and Functionalities
The Features page covers the full feature set:
- Symbologies: Code 128, Code 39, EAN-13, EAN-8, QR Code, UPC-A, and UPC-E with per-symbology option classes
- Encode options:
Code128Options(encode modes),Code39Options(Full ASCII, check digits),QrOptions(error correction, version, mask, encoding mode), EAN/UPC options (check digit handling) - Rendering:
RenderOptionsfor scale, DPI, colors, quiet zone, text display, and font control - Output formats: SVG via
to_svg()and PNG viato_png() - Error handling: Typed exceptions (
InvalidInputError,EncodingError,SymbologyNotFoundError,UnsupportedCapabilityError) inheriting fromBarcodeError - Input validation: Per-symbology
InputParserclasses validate data before encoding
Encode Options
The Encode Options page provides detailed coverage of each symbology’s option class with working code examples.
Barcode Generation
The Barcode Generation page covers the high-level generation API, the BarcodeService architecture, and the SymbologyRegistry.
Barcode Rendering
The Barcode Rendering page covers RenderOptions, SvgRenderer, PngRenderer, and the Renderer abstraction.
Key Concepts
High-level API: The top-level generate() function and per-symbology helpers (code128(), qr(), ean13(), etc.) are the primary entry points. Each returns a Barcode object with to_svg() and to_png() methods.
Option classes: Each symbology has a dedicated options class inheriting from EncodeOptions. RenderOptions controls visual output separately from encoding.
Zero dependencies: The library is pure Python. No native extensions, no system packages, no third-party libraries.
Getting Started
If you have not yet installed the library, see the Getting Started section and the Installation guide.