========================================
[](https://travis-ci.org/michaeltcoelho/pagarme.py)
[](https://coveralls.io/r/michaeltcoelho/pagarme.py)
O pagarme.py oferece integração com a API REST de pagamentos do Pagar.me utilizando Python.
> Durante a integração de sua aplicacão com o Pagar.me, consulte a referência da API,
> para estar ciente das informações necessárias para realizar a integracão.
> Referência da API [https://pagar.me/docs/api/](https://pagar.me/docs/api/)
Instalação
=========================================
Você pode instalar via pip:
```
pip install pagarmepy
```
ou clonando o repositório e instalando localmente:
```
git clone https://github.com/michaeltcoelho/pagarme.py
cd pagarme
pip install -r requirements.txt
python setup.py install
```
Testes
==========================================
Rodando os testes:
```bash
make test
```
Como usar
===========================================
Registre-se no Pagar.me e pegue sua `Chave da API` e `Chave de criptografia` do ambiente de testes.
[https://pagar.me/](https://pagar.me/).
Configurar o pagarme.py utilizando as próximas duas maneiras, ficará uma objeto global disponível da classe `PagarmeApi:class:`
que é responsável por manipular as requisições e respostas do Pagar.me:
```python
from pagarme import api
api.configure({
'api_key': 'Sua chave da API',
'encryption_key': 'Sua chave de criptografia'})
```
Configure através de variáveis de ambiente:
```bash
export PAGARME_API_KEY='Sua chave da API'
export PAGARME_ENCRYPTION_KEY='Sua chave de criptografia'
```
Para não trabalhar com um objeto global:
```python
from pagarme import api, resources
my_api = api.PagarmeApi({
'api_key': 'Sua chave da API',
'encryption_key': 'Sua chave de criptografia'})
plan = resources.Plan({...}, api=my_api)
```
Criar um Plano
===========================================
## License
Written by Michael Coelho
Released under the MIT License: http://www.opensource.org/licenses/mit-license.php
Metadata
Release files for pagarmepy 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pagarmepy-1.0.1.tar.gz | 11.9 kB | Without provenance | Details for pagarmepy-1.0.1.tar.gz |
Release files / pagarmepy-1.0.1.tar.gz
| Download URL | pagarmepy-1.0.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a4ebf7dc6dce758ff7d0603daa49e212e14837dc59faa63145088d9afc07843
|
|
BLAKE2b-256 checksum How to use checksums |
33029fa37c1a0fd8eead3446aa9fced350da10ea550a2e9aee09f7057fe0e161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pagarmepy 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.