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()

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.

Source Distribution

timchen-0.0.3.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

timchen-0.0.3-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page