All Projects → berdario → Pypayments

berdario / Pypayments

Simple payment service (just a proof of concept with no user management)

Programming Languages

elm
856 projects

Install/run

in a Python3 virtualenv

pip install -r requirements.txt

Run the tests:

py.test

Run the server:

hug -f payments.py

There're 3 api endpoints:

http://localhost:8000/accounts

This will return all the accounts (with their name, email, balance)

http://localhost:8000/transactions?account_id=2

This will return all the transactions involving a single account

http://localhost:8000/pay?source=1&recipient=2&amount=1

This will make a payment, while respecting the constraints (source and recipient have to exist, no negative balance)

By accessing http://localhost:8000/index the Elm frontend can be used to interact with the api

To rebuild index.html simply run

elm-make frontend/Main.elm
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].