bpesics / pe-payment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This is very simple REST service implemented in Python with Flask for the The Pleo SRE Challenge

Local testing

make deploy-local

Docker build and image publishing

Implemented as a GitHub workflow with .github/workflows/docker-publish.yml

Image available at: ghcr.io/bpesics/pe-payment:latest

Available endpoints

  • /health
    curl -i http://localhost:9000/health
    
  • /api/v1/charge POST
    curl -i -XPOST -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" http://localhost:9000/api/v1/charge
    

Logging

If a valid json document is POST-ed to /api/v1/charge the request payload is logged to stdout:

for instance:

INFO:app:json request => {'key1': 'value1', 'key2': 'value2'}

About


Languages

Language:Python 45.4%Language:Dockerfile 32.6%Language:Makefile 22.0%