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
Pysauce is a Discord bot which utilizes the SauceNAO API to locate the source of images.

Pysauce Pysauce is a Discord bot which utilizes the SauceNAO API to locate the source of images. Use Pysauce has one public instance always running, i

Akira 2 Oct 04, 2022
A Telegram Bot That Provides Permanent Download Links For Sent Files.

FileStreamBot A Telegram bot to all media and documents files to web link . Report a Bug | Request Feature Demo Bot: 🍁 About This Bot : This bot will

Flux Inc. 1 Nov 02, 2021
A discord token nuker With loads of options that will screw an account up real bad

A discord token nuker With loads of options that will screw an account up real bad, also has inbuilt massreport, GroupChat Spammer and Token/Password/Creditcard grabber and so much more!

XPTGR 0 Aug 07, 2022
A Webhook spammer For Python

Webhooker Optimizations Asynchronous Fast & Efficient Multi Tasked Usage Put high threads/tasks for maximum impact Webhook must be valid Proof of conc

andria 1 Dec 20, 2021
An unofficial client library for Google Music.

gmusicapi: an unofficial API for Google Play Music gmusicapi allows control of Google Music with Python. from gmusicapi import Mobileclient api = Mob

Simon Weber 2.5k Dec 15, 2022
DonLee Robot

🤖 𝐃𝐎𝐍 𝐋𝐄𝐄 𝐑𝐎𝐁𝐎𝐓 𝐕𝟐 🤖 👋 Hey Muhammed, Iam DonLee RoBoT Make me an admin for your group and channel then connect me.... 🎉 🙂 To build a

Muhammed 27 Dec 01, 2022
StudyLion is a Discord bot that tracks members' study and work time while offering members to view their statistics and use productivity tools such as: To-do lists, Pomodoro timers, reminders, and much more.

StudyLion - Discord Productivity Bot StudyLion is a Discord bot that tracks members' study and work time while offering members the ability to view th

45 Dec 26, 2022
Lending-Club-Loans - Using TensorFlow to create an ANN model to predict whether people would charge off or pay back their loans.

Lending Club Loans: Brief Introduction LendingClub is a US peer-to-peer lending company, headquartered in San Francisco, California.[3] It was the fir

Ali Akram 1 Jan 03, 2022
A maintained fork of Danny's discord.py

Nextcord A modern, easy-to-use, feature-rich, and async-ready API wrapper for Discord written in Python. Fork notice This is a fork of discord.py, whi

977 Jan 05, 2023
Easy to use reaction role Discord bot written in Python.

Reaction Light - Discord Role Bot Light yet powerful reaction role bot coded in Python. Key Features Create multiple custom embedded messages with cus

eibex 109 Dec 20, 2022
Upload comma-delimited files to biglocalnews.org in your GitHub Action

Upload comma-delimited files to biglocalnews.org in your GitHub Action Inputs api-key: Your biglocalnews.org API token. project-id: The identifier of

biglocalnews 1 Apr 20, 2022
An youtube videos thumbnail downloader telegram bot.

YouTube-Thumbnail-Downloader An youtube videos thumbnail downloader telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT L

Fayas Noushad 40 Oct 21, 2022
Visualize size of directories, s3 buckets.

Dir Sizer This is a work in progress, right now consider this an Alpha or Proof of Concept level. dir_sizer is a utility to visualize the size of a di

Scott Seligman 13 Dec 08, 2022
短信发送 Python 程序(包含1000+有效接口)

短信轰炸 Python 程序(包含1000+有效接口) 前言 这是一个爬取网络上在线轰炸的接口,后通过 Python 异步 请求接口以达到 手机短信轰炸 的目的。 此为开源项目,仅供娱乐学习使用,使用者所带来的一切后果与作者无关,使用请遵守相关的法律法规,合理使用,请勿滥用。 食用方法 1. 爬取接

蓝鲸落 10.2k Jan 02, 2023
PS3API - PS3 API for TMAPI and CCAPI in python.

PS3API PS3 API for TMAPI and CCAPI in python. Examples Connecting and Attaching from ps3api import PS3API PS3 = PS3API(PS3API.API_TMAPI) if PS3.Conn

Adam 9 Sep 01, 2022
A Python library for PagerDuty.

Pygerduty Python Library for PagerDuty's REST API and Events API. This library was originally written to support v1 and is currently being updated to

Dropbox 164 Dec 20, 2022
Telegram client written in GTK & Python

Meowgram GTK Telegram Client 🐱 Why Meogram? Meowgram = Meow + Gram :D Meow - Talking cats sound. It's a symbol of unique and user friendly UI of clie

Artem Prokop 71 May 04, 2022
A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.

24 July 2020 Actively soliciting contributers! Ping @ronncc if you would like to help out! pytube pytube is a very serious, lightweight, dependency-fr

pytube 7.9k Jan 02, 2023
A Discord Server Cloner With Lot Of New Features.

Technologies Screenshots Table of contents About Installation Links Deployed Features Website Score Contribution Need Help? Instagram Discord About A

NotSakshyam 25 Dec 31, 2022
Automatically download any NFT collection from OpenSea.

OpenSea NFT Stealer The sole purpose of this script is to download any NFT collection from OpenSea. How does it work? Basically, the OpenSea website a

Dan 111 Dec 29, 2022