Skip to main content

Timchen

Project description

Timchen

Timchen.py utilizes the timchen.tk api to get random timchen images. It can be utilized both synchronously and asynchronously.

Here is an example on how to use it asynchronously:

import timchen
import asyncio

async def main():
	t = await timchen.get_random()
	print(t.url)
	print(t.description)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

And here is an example on how to use it synchronously

import timchen

def main():
	t = timchen.get_random_sync()
	print(t.url)
	print(t.description)

main()

Functions:

get_random()

Gets a random timchen pic

get_from_id(<id>)

Gets a timchen pic from its ID

get_all()

Gets all the timchen pics as a tuple

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for timchen, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size timchen-0.0.3-py3-none-any.whl (2.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size timchen-0.0.3.tar.gz (1.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page