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.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for tj_tpauth-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c00740be035accd6528d76ebbf515d72f97a2399ae036a3611e88cc4f16f91d6 |
|
MD5 | 63360215978acb2a20d9b72f16b4a29b |
|
BLAKE2b-256 | 123b25e68ba69b3b4a9e5f7858621a5dd25951cfa95992a021804b05030ed950 |