Reflex custom component library for Clerk, a user management platform. Updated for Reflex 0.6.0
Project description
clerk
A Reflex custom component clerk. [Updated for Reflex 0.6.0+]
Installation
pip install reflex-clerk
Usage
import reflex as rx
from reflex_clerk import clerk_provider, sign_in_button, install_signin_page
publishable_key = "your_clerk_publishable_key"
def index() -> rx.Component:
return clerk_provider(
rx.vstack(
sign_in_button(),
align="center",
spacing="7",
),
publishable_key=publishable_key,
)
app = rx.App()
app.add_page(index)
install_signin_page(app)
In this example:
- We import the necessary components from Reflex and the
reflex_clerklibrary. - We define the
publishable_keyfor our Clerk instance. - We create a function index that returns a Reflex component.
- Inside the index function, we use the
clerk_providercomponent from reflex_clerk. This component sets up the Clerk context for the rest of the components within it. - Within the
clerk_provider, we create a vertical stack (rx.vstack) that contains the sign_in.sign_in_button() component from reflex_clerk. This component renders a sign-in button for Clerk. - We pass the
publishable_keyto theclerk_providercomponent.
With this setup, you'll have a page that displays a sign-in button powered by Clerk. You can then add more Clerk components, such as user profile information, sign-out buttons, and more, within the clerk_provider.
Further documentation can be found in the reference docs
Build
Suggest using a virtual environment
pip install -r requirements.txtpip install .[dev]python -m build
License
Apache-2.0
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Acknowledgments
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
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 reflex_clerk_custom-1.0.4.tar.gz.
File metadata
- Download URL: reflex_clerk_custom-1.0.4.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76357528569ab4a2262cd4989285db8254b36186082f11ac928ff4d900a8aa33
|
|
| MD5 |
5da4eea557d29980ef28d42aaa7738c8
|
|
| BLAKE2b-256 |
569257833333017ab8fb1702eb4722e7d957df2c33b4ead19b43bb90876c0c6d
|
File details
Details for the file reflex_clerk_custom-1.0.4-py3-none-any.whl.
File metadata
- Download URL: reflex_clerk_custom-1.0.4-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b338f8126d1f3e18dd18ba86ebd6822f93bf4f998f8da1ad3763280ae04af8cb
|
|
| MD5 |
3ccb539786ede6a2d37b5ffbbd616b60
|
|
| BLAKE2b-256 |
096f58e0fe8472c79c5ccf3edf7958091b6b35ad2ced558c4fb3b1d662b96458
|