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
Release history Release notifications | RSS feed
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)