Convert receiver.php to Python

What the topic says