Metadata-Version: 2.1
Name: truechecker
Version: 2021.10.11
Summary: Python client for True Checker API
Home-page: https://gitlab.com/true-web-app/true-checker/true-checker-python
License: MIT
Keywords: True Checker,Telegram,Bots
Author: Oleg A.
Author-email: oleg@trueweb.app
Maintainer: Oleg A.
Maintainer-email: oleg@trueweb.app
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: aiohttp (>=3.7,<4.0)
Requires-Dist: certifi (>=2021,<2022)
Requires-Dist: pydantic (>=1.8,<2.0)
Project-URL: Documentation, https://checker.trueweb.app/redoc/
Project-URL: Repository, https://gitlab.com/true-web-app/true-checker/true-checker-python
Description-Content-Type: text/markdown

# True Checker for Python

Python client library for [True Checker API](https://checker.trueweb.app/redoc)

## How to install

```bash
pip install truechecker
```

## How to use

```python
# 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()

```
_CAUTION: it's not a full code example. Await statements should be used within coroutines only._

## Contributing
Before making Pull/Merge Requests, please read the [Contributing guidelines](CONTRIBUTING.md)

