A protection decorator to protect components
Project description
Lilliepy Protect
a decorator to protect you components
how to use
from lilliepy_protect import protect
from reactpy import component, html
@component
def fallback():
return html.h1("u werent logged in...")
@protect(fallback=fallback, attr="logged_in")
@component
def ProtectedPage():
return html.h1("welcome")
# ...
protect -> (
comp: reactpy.types.ComponentType, # the component to be protected
fallback: reactpy.types.ComponentType, # the return url or component to navigate/render
attr: str # the value to find in the scope (basically the granter code)(defaulted to "granted")
)
# ...
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
lilliepy_protect-1.0.tar.gz
(2.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lilliepy_protect-1.0.tar.gz.
File metadata
- Download URL: lilliepy_protect-1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ed2bfd996765778e3d1af4876b1681b3b7ab847c8585071ede11697f105e17
|
|
| MD5 |
c54cb38c863559612800ec0787159e1d
|
|
| BLAKE2b-256 |
3cc8638609533a0b1e72c606d85ab4ce8b34cacfa9efc6f5715b215aa12fc807
|
File details
Details for the file lilliepy_protect-1.0-py3-none-any.whl.
File metadata
- Download URL: lilliepy_protect-1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dfb63640f64a34ab78e50394d0137d7be8f725438daa74f39abcef84bd6e6cc
|
|
| MD5 |
af2f196e6d659df3285d4b414b1524f4
|
|
| BLAKE2b-256 |
f6c175e4e9b9266bda9c336268efdcfb48dbad2fc77e3ec1b1f6b3a09f8d5630
|