Skip to main content

Installation

pip3 install tokko_auth_lite
sudo -H pip3 install tokko_auth_lite

Usage

from tokko_auth_lite.core import Token
from tokko_auth_lite.tools.testing import TokenFabrik

_jwt = TokenFabrik(permission=["companies:read_branches", "spacex:launch_rockets"])

token = Token.from_header({"Authorization": f"Bearer {_jwt}"})
print(token)
print(token.is_valid())
print(token.permissions)
print(token.has_permission("companies:read_branches", "spacex:launch_rockets"))
print(token.has_permission("spacex:launch_rockets"))
print(token.has_permission("companies:read_branches", "spacex:launch_rockets", require_all=True))
print(token.user_id)

Tutorials

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokko_auth_lite-0.0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file tokko_auth_lite-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: tokko_auth_lite-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for tokko_auth_lite-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 89997c515c2d4d8ecbb60d42aba58a1300fd9dcff8a54c3757173deea8f3a45c
MD5 568505c7f1bc9e7093f7a587b0bb87c3
BLAKE2b-256 6b3423a4b7fa88a2c22882cec4700c9a8b40bdb9b76fc3bdeac134f6e1cf2fb1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 file

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page