All Projects → Athesdrake → aiotfm

Athesdrake / aiotfm

Licence: MIT license
An asynchronous event based client for Transformice.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to aiotfm

Transfromage
An API that provides access to the game Transformice.
Stars: ✭ 20 (+0%)
Mutual labels:  transformice, atelier801
miceditor
Miceditor: Transformice map editor
Stars: ✭ 14 (-30%)
Mutual labels:  transformice

aiotfm

aiotfm is an asynchronous Client implementation of Transformice that allows developers to make bots easily. It uses an API endpoint to get the keys needed to connect to the game. aiotfm is based on TransFromage which use threads instead of coroutines.

If you prefer Lua over Python then checkout the Lua version made by @Lautenschlager-id

Join the Fifty Shades of Lua discord server to discuss about this API and to receive special support.

Keys Endpoint

This API depends on an endpoint that gives you access to the Transformice encryption keys.

To use it you will need a token which you can get by applying through this form. See below to know the names of Transfromage managers who handle the token system.

  • Tocutoeltuco @discord=> Tocu#0018 212634414021214209;
  • Blank3495 @discord=> 󠂪󠂪 󠂪󠂪 󠂪󠂪󠂪󠂪 󠂪󠂪 󠂪󠂪󠂪󠂪 󠂪󠂪 󠂪󠂪#8737 436703225140346881;
  • Bolodefchoco @discord=> Lautenschlager#2555 285878295759814656.

Advantages

  • 3 times faster than TransFromage
  • Compatible with discord.py
  • Faster
  • Asynchronous

Speed

TransFromage takes around 13 seconds to be connected to the community platform while aiotfm takes less than 4 seconds. Those results can vary depending on your computer and your internet connection.

Installation

You can install aiotfm using pip: pip install aiotfm

To have a more up to date package, you have to clone this repository and install it manually:

git clone https://github.com/Athesdrake/aiotfm
cd aiotfm
python3 -m pip install .

Requirements

aiotfm require python 3.7 or higher and aiohttp.

Python 3.6

Python 3.6 support is not guaranteed since v1.4.3 as Python 3.6 has reached EOF.

Python 3.5

You can still use aiotfm with Python 3.5.3 or higher by cloning the repository and remove the sugar syntax of Python 3.6. These changes are the typed variables and fstrings. Due to a major update in the asynchronous stuff of Python 3.5.3, aiotfm is not compatible with the previous versions of Python.

Update

To update aiotfm, use the following command: pip install -U aiotfm

Example

import aiotfm

bot = aiotfm.Client()


@bot.event
async def on_ready():
	print('Connected to the community platform.')

bot.run("api_tfmid", "api_token", "username", "password", encrypted=False, room="start_room")

A more complete example.

Documentation

You can find the documentation of aiotfm here.

About

You can have more information about TransFromage in this thread.

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].