Skip to main content

Flet Dropzone control

Dropzone control for Flet integrating desktop_drop

Installation

pip install flet-dropzone

⚠️ Please build once before running.
⚠️ Please build once before running.
⚠️ Please build once before running.

for windows user:

flet build windows -v

for macOS user:

flet build macos -v

for linux user:

flet build linux -v

for web user:

flet build web -v

Example

import flet as ft

import flet_dropzone as ftd


def main(page: ft.Page):
    page.vertical_alignment = ft.MainAxisAlignment.CENTER
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER

    async def on_dropped(e: ftd.DropzoneEvent):
        for file in e.files:
            data = await e.control.read_bytes(file)
            print(f"Dropped: {file.name} ({len(data)} bytes) from {file.path}")

    page.add(
        ftd.Dropzone(
            content=ft.Container(
                ft.Text("Drop here!"),
                width=500,
                height=500,
                alignment=ft.Alignment.CENTER,
                bgcolor="red",
            ),
            on_dropped=on_dropped,
            on_entered=lambda e: print("Entered"),
            on_exited=lambda e: print("Exited"),
        )
    )


ft.run(main)

DropzoneEvent.files is a list of DropzoneFile objects with name and path properties. On desktop platforms path is a real file path, while on web it is a temporary blob: URL — use Dropzone.read_bytes() to get the file content on any platform.

References

Download files

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

Source Distribution

flet_dropzone-0.4.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

flet_dropzone-0.4.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file flet_dropzone-0.4.0.tar.gz.

File metadata

  • Download URL: flet_dropzone-0.4.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for flet_dropzone-0.4.0.tar.gz
Algorithm Hash digest
SHA256 dede0c401dd20d0d90c950d1dcb396664b11da25da8a152b2770ee2bc825c44b
MD5 520502852675bbf0d37354cc67070be9
BLAKE2b-256 74a3fc72d64a7f3756d21636715a80b9632aca58ac3751550d96b0db929dd26b

See more details on using hashes here.

File details

Details for the file flet_dropzone-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: flet_dropzone-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for flet_dropzone-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7e47c5ffed70d09ecd9079454f7678f9d4d4bd88cf1432f7e12489ca4987a6d
MD5 2de246beafb749984b351c659d644883
BLAKE2b-256 df671d07086500987ec47454d558ec408405498ac2ac9ac4896039cec3cfdc4b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

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