Skip to main content

DataMatrix Generator

This project is a DataMatrix generator written in Python. It allows you to generate DataMatrix barcodes from text input and save them as image files.

Features

  • Generate DataMatrix barcodes from text input
  • Save generated DataMatrix as PNG images
  • Customizable output directory
  • Error handling and logging

Requirements

  • Python 3.x
  • pylibdmtx
  • Pillow
  • pytest (for testing)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/datamatrix-generator.git
    cd datamatrix-generator
    
  2. Create a virtual environment and activate it:

    python3 -m venv venv
    source venv/bin/activate
    
  3. Install the required packages:

    pip install -r requirements.txt
    

Usage

  1. Run the main script:

    python3 main.py
    
  2. Follow the prompts to enter the file name and the message for the DataMatrix.

Project Structure

  • core/
    • datamatrix.py: Contains the DatamatrixGenerator class for generating DataMatrix barcodes.
    • errors/
      • error_handler.py: Contains the error handling logic.
  • input/
    • getTerminalInput.py: Contains the function to get input from the terminal.
  • main.py: Entry point of the application.
  • tests/
    • test_datamatrix.py: Contains tests for the DatamatrixGenerator class.

Testing

To run the tests, use the following command:

pytest

Release files for datamatrix-lib 0.1

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

Source distribution (sdist)

Source distribution for datamatrix-lib 0.1
File Size Uploaded
datamatrix_lib-0.1.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datamatrix-lib 0.1
File Interpreter ABI Platform
datamatrix_lib-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 kB

Release files / datamatrix_lib-0.1.tar.gz

Download URL datamatrix_lib-0.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fd663a954ee615227abc77d200e259a068a5f14c1fb943254d67de369c878182
BLAKE2b-256 checksum
How to use checksums
76f73166ffe294b9d048593f2070bb425268040fafa64f2c885c848884c97eda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.3

Release files / datamatrix_lib-0.1-py3-none-any.whl

Download URL datamatrix_lib-0.1-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de58960d4419788b04ecfba8cf7207fcbf773d42c142e62df4a372f76bf9ce2c
BLAKE2b-256 checksum
How to use checksums
8cc756b6491cc74f3d60877b804d4b9a9245dcf49c75fb1e1bf07263aef6d9a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1 This release

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