Skip to main content

Python library for reading industrial scales using the P03 protocol.

Project description

📦 P03Py

Biblioteca Python para comunicação com balanças industriais via protocolo P03, com suporte à porta serial e TCP/IP.


📝 Descrição (PT-BR)

🚀 Conheça a P03Py, a primeira biblioteca Python dedicada à comunicação com balanças que utilizam o protocolo P03 (via serial ou TCP/IP).

Esta biblioteca foi desenvolvida para facilitar a integração com balanças industriais, utilizando leitura byte a byte com máquina de estados, validação de STX, CR e checksum, e extração de variáveis como peso bruto, líquido, tara e status da balança.

📺 Veja a demonstração da biblioteca no YouTube:
https://youtu.be/kWqxdXJBAPY

🔧 Compatível com portas COM (serial) ou conexões TCP/IP


📝 Description (EN)

🚀 Meet P03Py, the first Python library dedicated to communication with weighing scales using the P03 protocol (via serial or TCP/IP).

This library is designed to simplify integration with industrial scales, using byte-by-byte reading, a state machine, validation of STX, CR and checksum, and extraction of variables like gross weight, net weight, tare, and scale status.

📺 Watch the library demo on YouTube:
https://youtu.be/kWqxdXJBAPY

🔧 Compatible with serial (COM) ports and TCP/IP connections


📚 Funcionalidades | Features

  • Comunicação via porta serial (RS-232) ou TCP/IP
  • Máquina de estados para leitura segura
  • Verificação de integridade (STX, CR, Checksum)
  • Extração de dados: peso bruto, líquido, tara, status da balança
  • Suporte a pacotes P03 reais usados na indústria

📦 Instalação | Installation

pip install p03py

📁 Exemplos disponíveis | Available Examples

  • diagnostico.py — Testa a porta serial com diversas configurações para descobrir qual está sendo utilizada pela balança

  • teste_leitura_serial.py — Exemplo de leitura de dados da balança via porta serial

  • teste_leitura_tcp.py — Exemplo de leitura de dados da balança via conexão TCP/IP

  • diagnostico.py — Tests the serial port with multiple settings to discover the correct configuration used by the scale

  • teste_leitura_serial.py — Sample test for reading scale data using serial port

  • teste_leitura_tcp.py — Sample test for reading scale data using TCP/IP connection


📄 Licença | License

MIT © 2025 — Ronei Toporcov

Project details


Download files

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

Source Distribution

p03py-1.0.1.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

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

p03py-1.0.1-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file p03py-1.0.1.tar.gz.

File metadata

  • Download URL: p03py-1.0.1.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for p03py-1.0.1.tar.gz
Algorithm Hash digest
SHA256 34dc5bc45af4b30a8ca5b7ff8b41ea3670c0739ffef1d50c0e174c4bdae3ff9c
MD5 b4f1e7e24c1e52c07c947c3679ba9f77
BLAKE2b-256 ed1acab23d8b24d832d2d407a6eaca03cab4d3bf63de705eaa205e38d48e2a34

See more details on using hashes here.

File details

Details for the file p03py-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: p03py-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for p03py-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba52056082fdb099401199fdee802b744d4f6971af6cc5705dda5090402db411
MD5 29d71dc0f7fc74bc4eec35127d6915ad
BLAKE2b-256 7b86cf1f9a0855ba98fcbb11a4098bb4dd96693b175a6f18089b829e2d11d1ad

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