Python client for True Checker API
Project description
True Checker for Python
Python client library for True Checker API
How to install
pip install truechecker
How to use
# import TrueChecker
from truechecker import TrueChecker
# create an instance (poss your Telegram bot token here)
checker = TrueChecker("your_bot_token")
# prepare a file with users ids
# you should use string path, pathlib.Path object or io.BaseFile
file_path = "downloads/users.csv"
# send request to create a new job
job = await checker.check_profile(file_path)
print("Job created. ID:", job.id)
# get the status of job
job = await checker.get_job_status(job.id)
print("Job state:", job.state)
print("Job progress:", job.progress)
# if the job is done, let's get the profile
profile = await checker.get_profile("my_bot_username")
print("Bot profile:", profile)
# if you need to cancel the job
job = await checker.cancel_job(job.id)
print("Job state:", job.state) # Cancelled
# Don't forget to close checker on your app's on_shutdown
await checker.close()
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
truechecker-2021.4.6.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for truechecker-2021.4.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf59110bdcc6d884c91574c7247917dff7b616f3403adfe542c8a6bd3831df7 |
|
MD5 | 86ee852fda869e5a666b52ab9b885784 |
|
BLAKE2b-256 | 461685f17f899bf68880e8847b8373ff374cfb504db6e55668ee52dd86cb7c50 |