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.

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 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page