Skip to main content

Este projeto é uma biblioteca Python para gerar codigo e qrcode do Pix. Ele fornece uma interface simples e intuitiva para criar, modificar e validar dados de Pix.

Instalação

Para instalar o projeto, use o pip:

pip install pypixcode

Uso

Exemplo de como gerar um código Pix:

from pypixcode import PixBuilder

name = "Fulano De Tau"
pix_key = "42fbd387-e918-48c7-abd9-13958bea32ce"
value = "1.00"
city = "Para De Minas"
tx_id = "***"

# Cria uma instância do PixBuilder
pix_builder = PixBuilder(name, pix_key, value, city, tx_id)

code = pix_builder.get_code()

# result str:  00020126580014BR.GOV.BCB.PIX013642fbd387-e918-48c7-abd9-13958bea32ce52040000530398654041.005802BR5913Fulano De Tau6013Para De Minas62070503***63045039

Exemplo de como gerar um QR em base64 do código Pix:

from pypixcode import PixBuilder

name = "Fulano De Tau"
pix_key = "42fbd387-e918-48c7-abd9-13958bea32ce"
value = "1.00"
city = "Para De Minas"
tx_id = "***"

# Cria uma instância do PixBuilder
pix_builder = PixBuilder(name, pix_key, value, city, tx_id)

code = pix_builder.get_qrcode()
# result base64 image: iVBORw0KGgoAAAANSUhEUgAAAQkAAAEJAQAAAACvE+/JAAACuklEQVR42u1ZMY6rUBCbfApKjsBNyMWQiMTFkptwBEoKxKztednVr7b78peSYvVEXuGdeDz2EPnb5xGfK58rplf2iLhlbhHDmvkcMvsXvuqfeN7jyp/49fPPrhDukvnauzym4QS+fR6Pe65bCrMh3DlQzscYAnmhunHfO8DdY3SFC3wsLGgBbqDOufXOcPMcD3IXTzpyI8IW7lL4QIYT+MiDK/jMlLtUBjQYyvnXH1NlqM8Z0AMpQxDpTB6U1vlVt1USNSV3t+MGWsQ0QCgM4b5FQWNC3AVtt/6iPHgqA3/9FD6c0HT7skEoHqNjdRdUMogZ+A4gTckwvpsd4XKWsaaQL8zfG9AngQP9atlq+PUnCC18zprospU8WEnb01LIMNAIsjSCtMg25CyFDEUMmbFLvQVv1stFqgcth3ApA/EVGSZy9zLlbozCHGJsOXOeTHUXkSKKp7tGGwzkHf/C4SpktAscbeLuJY2gmnEmW+puc7nUXXkGBratnrl6hqUkV3432slSGVDdCj+srjJEtpMlGarBFgZ3pQkw4pbtZEmGlJ358bvJpnPlLoX2wklOAfK1tBUDMFtOtY7uBt6RPqe5SPL5GlzDDxxZtzWzs0t3tYg6LXX3UcuQd9PNITNGSfPUXaEaOYnJ3Y57vXUrl2bZapwQKaFlemdqKx54ChkriUk8yYeFFHjlaLOsbm1xKr2PxVhlNVPu0uLcU348S3dBi8VWdzkSvj0Dg0Qc03u0eQqZRgJpm33LQl0eZSEs1yKvprvNKTBalnsw3UDK3SicyfkyDrsmYSkDeZBa8WuqnaF+S9PtOQ3u9b1deL2rm66vUqhcldVU03N05W7BxUmLBU01JmGmd9/qKgkjpj3LLsjvnr5vfvS+B0LGTbSSMDywa7SsPUglIHL3Wd5xtdXdz6v9z5X/7coXs9mf7/Qucv8AAAAASUVORK5CYII=

Contribuição

  1. Faça um fork do projeto
  2. Crie uma branch para sua feature (git checkout -b feature/nova-feature)
  3. Commit suas mudanças (git commit -am 'Adiciona nova feature')
  4. Faça um push para a branch (git push origin feature/nova-feature)
  5. Abra um Pull Request

Licença

Este projeto está licenciado sob a Licença MIT - veja o arquivo LICENSE para mais detalhes.

Metadata

Release files for pypixcode 1.0.4

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

Source distribution (sdist)

Source distribution for pypixcode 1.0.4
File Size Uploaded
pypixcode-1.0.4.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypixcode 1.0.4
File Interpreter ABI Platform
pypixcode-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / pypixcode-1.0.4.tar.gz

Download URL pypixcode-1.0.4.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ee2e60a472c038ccaa10e9c680e6140b03f785ff87513f697b1529c0408701b2
BLAKE2b-256 checksum
How to use checksums
e1a9e095a28ef3e824115ef51b0c64eed2b9a2a90471d7ca037c8dc7c389aac0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Linux/5.15.167.4-microsoft-standard-WSL2

Release files / pypixcode-1.0.4-py3-none-any.whl

Download URL pypixcode-1.0.4-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88f818c41bbb3f127d2c8a9c6d68aac8087eed3452c23db7f048c7cdd6e4017f
BLAKE2b-256 checksum
How to use checksums
7f74e8052916d6b60d3e315de018de33c6f1568956138794acab3464aef7bac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Linux/5.15.167.4-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.2

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

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