tj-tpauth


Nametj-tpauth JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/duynguyen02/TJ-TPAuth
SummaryThe Python library helps authenticate accounts from TP Servers.
upload_time2024-07-30 03:23:08
maintainerNone
docs_urlNone
authorduynguyen02
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements aiohttp aiosignal async-timeout attrs certifi charset-normalizer frozenlist idna multidict requests urllib3 yarl
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TJ-TPAuth 1.0.0

### Sync

```python
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

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/duynguyen02/TJ-TPAuth",
    "name": "tj-tpauth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "duynguyen02",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/63/c1/fdf950314194e331c11a57c33f468ebe52752adcde5d3c803c698fe1d0e9/tj_tpauth-1.0.1.tar.gz",
    "platform": null,
    "description": "# TJ-TPAuth 1.0.0\n\n### Sync\n\n```python\nfrom tj_tpauth import TJTPAuth\n\ntpauth = TJTPAuth(\n    host='http://localhost:3000'\n)\n\nlogin_status = tpauth.login(\n    username='username',\n    password='password'\n)\n\nif not login_status.status:\n    exit(0)\n\nauth_status = tpauth.from_token(login_status.data.token)\n\nif not login_status.status:\n    exit(0)\n\nprint(auth_status.data)\n```\n\n### Async\n\n```python\nimport asyncio\n\nfrom tj_tpauth import TJTPAuth\n\ntpauth = TJTPAuth(\n    host='http://localhost:3000'\n)\n\n\nasync def main():\n    login_status = await tpauth.aio_login(\n        username='username',\n        password='password'\n    )\n\n    if not login_status.status:\n        exit(0)\n\n    auth_status = await tpauth.aio_from_token(login_status.data.token)\n\n    if not login_status.status:\n        exit(0)\n\n    print(auth_status.data)\n\n\nasyncio.run(main())\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The Python library helps authenticate accounts from TP Servers.",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/duynguyen02/TJ-TPAuth"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "123b25e68ba69b3b4a9e5f7858621a5dd25951cfa95992a021804b05030ed950",
                "md5": "63360215978acb2a20d9b72f16b4a29b",
                "sha256": "c00740be035accd6528d76ebbf515d72f97a2399ae036a3611e88cc4f16f91d6"
            },
            "downloads": -1,
            "filename": "tj_tpauth-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "63360215978acb2a20d9b72f16b4a29b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2738,
            "upload_time": "2024-07-30T03:23:07",
            "upload_time_iso_8601": "2024-07-30T03:23:07.424907Z",
            "url": "https://files.pythonhosted.org/packages/12/3b/25e68ba69b3b4a9e5f7858621a5dd25951cfa95992a021804b05030ed950/tj_tpauth-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63c1fdf950314194e331c11a57c33f468ebe52752adcde5d3c803c698fe1d0e9",
                "md5": "6bdeb99b27f7e0631cb77c8abbedc9af",
                "sha256": "ad7547cc88a731d97a1eb5545046f48f15251bc61ffafaa9943dad2bb974cb3d"
            },
            "downloads": -1,
            "filename": "tj_tpauth-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6bdeb99b27f7e0631cb77c8abbedc9af",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2686,
            "upload_time": "2024-07-30T03:23:08",
            "upload_time_iso_8601": "2024-07-30T03:23:08.541676Z",
            "url": "https://files.pythonhosted.org/packages/63/c1/fdf950314194e331c11a57c33f468ebe52752adcde5d3c803c698fe1d0e9/tj_tpauth-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-30 03:23:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "duynguyen02",
    "github_project": "TJ-TPAuth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.9.5"
                ]
            ]
        },
        {
            "name": "aiosignal",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "async-timeout",
            "specs": [
                [
                    "==",
                    "4.0.3"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "23.2.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2024.7.4"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.3.2"
                ]
            ]
        },
        {
            "name": "frozenlist",
            "specs": [
                [
                    "==",
                    "1.4.1"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.7"
                ]
            ]
        },
        {
            "name": "multidict",
            "specs": [
                [
                    "==",
                    "6.0.5"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.2.2"
                ]
            ]
        },
        {
            "name": "yarl",
            "specs": [
                [
                    "==",
                    "1.9.4"
                ]
            ]
        }
    ],
    "lcname": "tj-tpauth"
}
        
Elapsed time: 0.32171s