I would suggest using the JavaScript library for this: https://github.com/toncenter/tonweb.
For TON JS examples, please refer to https://github.com/toncenter/examples.
Alternatively, you could try using this Python library: https://github.com/kdimentionaltree/tApi. It is a part of TonCenter for single liteserver, and an example can be found in sandbox.ipynb.