The official Twist API documentation

Python API

Introduction

To know before start

You should know that our servers do not have infinite capacity, and that you should not crash them or DDOS with requests. There is very little security on this, so we trust you.

Installation

For now, the API isn't on PyPi, then, copy twist.py from the GitHub to your project and import the module with import twist in your Python source code.

First example

This example will print the username of a user from his id.

import twist user_id = 1 api = twist.TwistAPI() print(api.getUserInfo(user_id)[0]["username"])