The Python library helps authenticate accounts from TP Servers.
Project description
TJ-TPAuth 1.0.0
Sync
from tj_tpauth import TJTPAuth
tpauth = TJTPAuth(
host='http://localhost:3000'
)
login_status = tpauth.login(
username='username',
password='password'
)
if not login_status.status:
exit(0)
auth_status = tpauth.from_token(login_status.data.token)
if not login_status.status:
exit(0)
print(auth_status.data)
Async
import asyncio
from tj_tpauth import TJTPAuth
tpauth = TJTPAuth(
host='http://localhost:3000'
)
async def main():
login_status = await tpauth.aio_login(
username='username',
password='password'
)
if not login_status.status:
exit(0)
auth_status = await tpauth.aio_from_token(login_status.data.token)
if not login_status.status:
exit(0)
print(auth_status.data)
asyncio.run(main())
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
tj_tpauth-1.0.0.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for tj_tpauth-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b90e7540f938b892b198ca4194fe10b097fca5baf848c91cccb453b040085e0 |
|
MD5 | 759cc1aece6762090982f8a6170240a2 |
|
BLAKE2b-256 | 46c0f2684a7874edc11604fc7a3357e05c6c866846be7e08cea6880743e64db8 |