Skip to main content

flet-wizards

PyPI version Python Flet License: MIT

Templates de wizard multi-step prontos para Flet — autenticação, perfil, onboarding e survey. Cada template é uma @ft.component autocontida com estado reativo, sistema de temas dark/light e callback on_complete tipado.


Instalação

pip install flet-wizards

Requer Python 3.12+ e Flet 0.85+.


Uso rápido

import flet as ft
from flet_wizards import AuthLoginWizard, WizardTheme


@ft.component
def App() -> ft.Control:
    async def handle_login(data: dict) -> None:
        email = data["email"]
        # autenticar...

    return AuthLoginWizard(
        theme=WizardTheme.SLATE,
        on_complete=handle_login,
    )


async def main(page: ft.Page) -> None:
    page.padding = 0
    page.bgcolor = "#0B0B0F"
    page.render(App)


ft.run(main)

Todos os wizards são importados a partir da raiz do pacote:

from flet_wizards import (
    AuthLoginWizard, AuthRegisterWizard, AuthRecoveryWizard, AuthTwoFactorWizard,
    ProfileSetupWizard, ProfileEditWizard, ProfileAvatarWizard,
    OnboardingWalkthroughWizard, SurveyFeedbackWizard,
    WizardTheme,
)

Templates disponíveis

Categoria Classe Steps Descrição Docs
auth AuthLoginWizard 2 Login com e-mail e senha + tela de confirmação. docs/auth/login.md
auth AuthRegisterWizard 3 Cadastro com conta, perfil e revisão. docs/auth/register.md
auth AuthRecoveryWizard 3 Recuperação de senha com código de 6 dígitos e força animada. docs/auth/recovery.md
auth AuthTwoFactorWizard 1 Verificação 2FA mobile-first com 6 dígitos individuais. docs/auth/two_factor.md
profile ProfileSetupWizard 3 Onboarding com identidade, bio, interesses e preferências. docs/profile/setup.md
profile ProfileEditWizard 3 Edição com diff visual destacando apenas campos alterados. docs/profile/edit.md
profile ProfileAvatarWizard 3 Avatar via URL ou iniciais com preview ao vivo. docs/profile/avatar.md
onboarding OnboardingWalkthroughWizard 4 Walkthrough mobile fullscreen em 4 slides. docs/onboarding/walkthrough.md
survey SurveyFeedbackWizard 3 Survey conversacional com NPS, comentário e categoria. docs/survey/feedback.md

Os wizards AuthTwoFactorWizard, OnboardingWalkthroughWizard e SurveyFeedbackWizard são mobile-first (Android / iOS). Quando abertos em desktop, o PlatformGuard exibe aviso com botão "Continuar mesmo assim".


Temas

A lib expõe 7 pares de temas, cada um em duas variantes (dark e light), totalizando 14 paletas internas. O dev escolhe pelo nome do par:

Par Dark primary Light primary
Slate #7C6EF6 #6366F1
Emerald #6EE7B7 #059669
Rose #FB7185 #E11D48
Azure #818CF8 #4F46E5
Amber #F59E0B #D97706
Crimson #DE1F26 #B91C1C
Frost #60A5FA #0052FF

Uso direto

from flet_wizards import WizardTheme

AuthLoginWizard(theme=WizardTheme.SLATE)        # variante dark
AuthLoginWizard(theme=WizardTheme.SLATE_LIGHT)  # variante light

Detecção automática (dark/light do sistema)

import flet as ft
from flet_wizards import AuthLoginWizard, WizardTheme
from flet_wizards.core import resolve_theme


@ft.component
def App() -> ft.Control:
    page = ft.context.page
    theme = resolve_theme(WizardTheme.SLATE, page.theme_mode)
    return AuthLoginWizard(theme=theme)

resolve_theme(theme, mode) devolve a variante correta:

  • ft.ThemeMode.DARK → variante dark do par.
  • ft.ThemeMode.LIGHT → variante light do par.
  • ft.ThemeMode.SYSTEM → consulta page.platform_brightness e cai em dark como fallback fora de contexto reativo.

Detalhes em docs/themes.md.


Preview local de desenvolvimento

Para inspecionar os wizards visualmente durante o desenvolvimento:

git clone https://github.com/Alisonsantos77/flet-wizards
cd flet-wizards
uv sync
uv run flet run

Abre uma janela com todos os 9 templates lado a lado, com seletor de tema e modo dark/light. O código do preview vive em src/gallery/ e não faz parte do pacote distribuído no PyPI — é apenas ferramenta de inspeção local.


Demo interativa

Veja todos os templates ao vivo no projeto de demonstração:

flet-wizards-gallery


Contribuindo

Veja CONTRIBUTING.md para instruções de como adicionar templates e convenções do projeto.


Licença

MIT © Alison Santos

Metadata

Release files for flet-wizards 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flet-wizards 0.2.3
File Size Uploaded Provenance Actions
flet_wizards-0.2.3.tar.gz 42.7 kB With provenance Details for flet_wizards-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flet-wizards 0.2.3
File Interpreter ABI Platform Actions
flet_wizards-0.2.3-py3-none-any.whl Python 3 none any Details for flet_wizards-0.2.3-py3-none-any.whl

Total release size: 97.2 kB

Release files / flet_wizards-0.2.3.tar.gz

Download URL flet_wizards-0.2.3.tar.gz
Size 42.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6cd1207839f9d3b849d225686516adeb362cd304576d7125d88cf91ee142100a
BLAKE2b-256 checksum
How to use checksums
8dd7840b6ed55de5d2bfc4a60f7c58dacd6568e6c15172b98134ff7f80243198
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / flet_wizards-0.2.3-py3-none-any.whl

Download URL flet_wizards-0.2.3-py3-none-any.whl
Size 54.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
177363c9f61e66955e7b5f59e3992d14d67c933330400a75246b8449e6df8073
BLAKE2b-256 checksum
How to use checksums
854c9c198627592bbf33b9cef774473683220cb9e260318fa618fe3014aa9c14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Security for flet-wizards 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flet_wizards-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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