Originally hosted at : https://github.com/erlepereira/thrift-experimentation (now deleted) Have pulled in inside here, owing to recent acquisition rumors ;) Date: 4 June 2018.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.1 KiB

This uses the Apache thrift protocol library.

In Debian (and most derivatives) it is available as python-thrift. Alternately, grab a copy and
install it from

This needs unittest


-- Generating the supporting server / client code
If you just want to run the code, just install the python-thrift library.

To re-genrate it (you need the thrift compiler running to do this.

the generated code for client and server is provided in the folder "gen-py"

thrift --gen py atmservice

-- Running code.
** Please, as configured, the server and client as designed to listen on localhost port 8082 only

go to atmcode folder

: start the atm (load the amount of 20$ notes and 50$ notes at start)

Usage: ./atmserver.py <number of 20$ notes> <number of 50$ notes>

: use the client (any amounts other than multiples of 20, 50 will yield an "Invalid amount":
If successul, the client terminal will show the amount withdrawn and the amount of 20$ and 50$ bills

* at start, the server runs a self test, and will fail to start if any of the tests fail.