Lib for create and show QRCode to PIX, you can show this code in another applications for payment by final consumer.

Overview

Pix QRCode - Python

Versao: 1.0

Biblioteca para a geração de codigos QR (BRCode como chamados na documentação do BACEN) a fins de facilitar a exibição para pagamentos ao consumidor.

O que é pix

Pix é o meio de pagamento eletrônico instantâneo, gratuito e com segurança, do Brasil. A iniciação de um Pix para uma pessoa física é gratuita. Wikipedia

Isenção de responsabilidade

Os QR codes não foram testados aos bancos, sempre antes de transferir verifique se as informações estão corretas. O autor e contribuidores se isenta de qualquer responsabilidade pela exatidão e integridade das informações divulgada.

Documentação de implementação BACEN - Banco Central do Brasil

Manual BRCode

Especificações técnicas e de negócio do ecossistema de pagamentos instantâneos brasileiro

Github Bacen

NÃO EXISTE NENHUMA INTEGRAÇÃO COM BANCOS


Exemplo basico

Importe a biblioteca do pip pip install pixqrcode

Importe a classe from pixqrcode import PixQrCode e defina os parametros como abaixo

Obrigatorio

  • name = Nome do destinatario
  • mobile (Chave PIX) = Telefone do destinatario Em Breve mais chaves
  • city = Cidade de remetente

Opcional

  • amount = Valor a ser enviado

    Valores serão sempre contados com 3 casas decimais e tem todos os digitos não numericos removidos, exemplos abaixo

    • R$ 1,00 = 100
    • R$ 10,00 = 1000
  • reference_label = Código da transferência. Codigo não obrigatorio mais pode auxiliar em casos como ecommerce e vendas diretas por Pix

    pix = PixQrCode("Fulano De Tal", "(70) 97070-7070", "Brasilia", "100")

Retorno do QRCode e codigo BRCode

seguimos com o objeto de cima definido iremos chamar os metodos e suas funções

Metodos

is_valid()

Verifica se todos os campos inseridos são validos e pode seguir com a geração do QRCode. Retorna um valor boolean

export_base64()

Retorna direto em formato base64 tipo imagem PNG (Portable Network Grapich) para ser renderizado dentro de uma tag img HTML ou ser transportado por uma API e demais usos.

pix.export_base64()

qrcode pagamento

save_qrcode(folder, filename, **kwargs)

pix.save_qrcode("/pixs","pix-fulano")

Caso queira você pode salvar o codigo gerado em uma pasta com um nome especifico para ter o codigo. Não precisa especificar o formato do arquivo sempre será PNG

Pode retornar o valor dentro BufferIO para ser novamente processado.

A geração do QRCode é feita com a biblioteca Pillow então você pode utilizar para deixar seu QRCode ainda mais personalizado passando os parametros por **kwargs

generate_code()

Irá retornar a string com a qual foi gerado o QRCode contendo os valores todos em suas posições como descrito na documentação do BACEN

Exemplos

Contem mais exemplos para facilitar a sua implementação

  1. API Dockerfile - port 8000
  2. Console

Em breve mais...

Toda contribuição é bem vinda!

Owner
João Camargo
Follow me: Twitter: @mostela_ Instagram: @_mostela_
João Camargo
Discord Mass Report script that uses multiple tokens

Discord-Mass-Report Discord Mass Report script that uses multiple tokens, full credits to https://github.com/hoki0/Discord-mass-report who made it in

cChimney 4 Jun 08, 2022
A Powerful, Smart And Simple Userbot In Telethon.

Owner: Masterolic 🇮🇳 BLACK LIGHTNING A Powerful, Smart And Simple Userbot In Telethon. Credits This is A Remix Bot Of Many UserBot. DARKCOBRA Friday

Masterolic 1 Nov 28, 2021
A python bot that will allow you to have maximum luck during Veve drops.

VeveBot You can follow me here Github | Twitter Features: - Click on the purchase at the time of the drop. - Be able to choose to do more than one tes

Rodz 1 Dec 04, 2021
ToqueIO Nuke tools - A collection of tools designed to assist in enhancing your workflows within nuke

ToqueIO Nuke tools - A collection of tools designed to assist in enhancing your workflows within nuke

4 Feb 19, 2022
Twitter for Python!

Tweepy: Twitter for Python! Installation The easiest way to install the latest version from PyPI is by using pip: pip install tweepy You can also use

9.4k Jan 07, 2023
Collection of AWS Fault Injection Simulator (FIS) experiment templates.

Collection of AWS Fault Injection Simulator (FIS) experiment templates. These templates let you perform chaos engineering experiments on resources (applications, network, and infrastructure) in the A

Adrian Hornsby 8 Nov 27, 2022
🐍 The official Python client library for Google's discovery based APIs.

Google API Client This is the Python client library for Google's discovery based APIs. To get started, please see the docs folder. These client librar

Google APIs 6.2k Jan 08, 2023
Minimal API for the COVID Booking System of the Offices at the UniPD Math Dep

Simple and easy to use python BOT for the COVID registration booking system of the math department @ unipd (torre archimede). This API creates an interface with the official website, with more useful

Guglielmo Camporese 4 Dec 24, 2021
Sakura: an powerfull Autofilter bot that can be used in your groups

Sakura AutoFilter This Bot May Look Like Mwk_AutofilterBot And Its Because I Like Its UI, That's All Sakura is an powerfull Autofilter bot that can be

PaulWalker 12 Oct 21, 2022
Discord-selfbot - Very basic discord self bot

discord-selfbot Very basic discord self bot still being actively developed requi

nana 4 Apr 07, 2022
A Discord Rich Presence App to set your own custom rich presence.

discord-rich-presence A Discord Rich Presence App to set your own custom rich presence. #BUILDS Ready to use package are available inside "finalpackag

1 Nov 22, 2021
A collection of discord tools I've made.

Discord A collection of discord tools i've made. What's in here? Basically every discord related project i've worked on can be found here, i'll try an

?? ?? ?? 6 Nov 13, 2021
Real-time cryptocurrencies prices.

New update added more cryptocurrencies and GBP If you like it give it a star Crypto-watcher is simple program showing price of cryptocurrency in USD a

Adrijan 25 Dec 13, 2022
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API

pycord A fork of discord.py. PyCord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Mo

Pycord Development 2.3k Dec 31, 2022
🎥 Stream your favorite movie from the terminal!

Stream-Cli stream-cli is a Python scrapping CLI that combine scrapy and webtorrent in one command for streaming movies from your terminal. Installatio

R E D O N E 379 Dec 24, 2022
The simple way of using Imgur.

PyImgur The simple way of using Imgur. You can upload images, download images, read comments, update your albums, message people and more. In fact, yo

Andreas Damgaard Pedersen 120 Dec 06, 2022
Python script that extract data via YouTube Api and manipulates it.

UNLIMITED README for the Unlimited game [Mining game] Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Project

Serban Chisca 1 Dec 12, 2021
A discord nitro generator written in python

VerseGenerator A discord nitro generator written in python Usage ・Fork the repo ・Clone it to replit ・Install the required packages and run it ・Input t

NotDrakezz 4 Nov 13, 2021
NiceHash Python Library and Command Line Rest API

NiceHash Python Library and Command Line Rest API Requirements / Modules pip install requests Required data and where to get it Following data is nee

Ashlin Darius Govindasamy 2 Jan 02, 2022
Discord group chat spammer concept.

GC Spammer [Concept] GC-Spammer for https://discord.com/ Warning: This is purely a concept. In the past the script worked, however, Discord ratelimite

Roover 3 Feb 28, 2022