import asyncio
import tixte
async def main():
client = tixte.Client('your-master-token', 'your-domain')
file = tixte.File('this_image.png')
async with client:
upload = await client.upload(file) # Upload file
print(f'Uploaded file {upload.url} - {upload.filename}')
asyncio.run(main())
Recommended Python 3.8.0 or higher
To install the library you can do the following
# Linux / MacOS
python -m pip install tixte.py
# Windows
py -m pip install tixte.py
python -m pip install git+https://github.com/NextChai/tixte.py
A master token is a token given by Tixte to allow applications to access and make requests to the API. It can be obtained by:
- Going to the Tixte dashboard
- Pressing
Control + Shift + I
to open the developer console - Entering the following command:
localStorage.getItem("sessionToken")
- The response outputted into the console is your master token.
Documentation is available here.
Please note the layout and style for the documentation and all of the source that goes along with it is directly from Rapptz/discord.py.
All credit for the source of the documentation goes to Rapptz and his group is contributors. In my experience with sphinx, there is nothing close to how well put together this style of documentation is, it's a pleasure to work with it.