Python Jaccount Auth
A small plugin to help use jaccount login in python programs.
Forked from tc-imba's python-jaccount-cli.
Example
import asyncio
from getpass import getpass
from jaccount_cli import JaccountCLIAsyncIO
async def main():
async with JaccountCLIAsyncIO("https://umjicanvas.com/login/openid_connect") as cli:
await cli.init()
captcha_ascii = cli.captcha_generate_ascii()
print()
print(captcha_ascii)
print()
# or you can use
# cli.captcha_show_external()
captcha = input("Please enter the shown captcha: ")
username = input("Please enter jaccount username: ")
password = getpass("Please enter password: ")
await cli.login(username, password, captcha)
async with cli.session.get(
"https://umjicanvas.com/api/v1/users/self/favorites/courses?include[]=term&exclude[]=enrollments",
headers={"Accept": "application/json"},
) as response:
print(await response.text())
# print cookies
cookies = cli.get_cookies()
for key, cookie in cookies.items():
print('Key: "%s", Value: "%s"' % (cookie.key, cookie.value))
if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(main())
License
MIT
Metadata
Release files for jaccount-auth 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jaccount-auth-0.0.1.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jaccount_auth-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / jaccount-auth-0.0.1.tar.gz
| Download URL | jaccount-auth-0.0.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49e2a22555dfb9e8a9631ea3ebae585fd6989a8f4fc0935cf749843752e204a2
|
|
BLAKE2b-256 checksum How to use checksums |
bc35a8d75b13224fa9aaf0523a8afd53035b562f5293b74a726f9f7bacfe24cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / jaccount_auth-0.0.1-py3-none-any.whl
| Download URL | jaccount_auth-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d503fd72261614878ddbc7169c750ff6fab519b303e0e4fcbd395517b212699
|
|
BLAKE2b-256 checksum How to use checksums |
956d7ecc127fcfe12e1dd83d35671310637edaba833ea5b4b2cf9b613612d0fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|