Skip to main content

flet_camera

📸 Кастомный компонент камеры для Flet с WebView + WebSocket.

Установка

pip install flet-camera-webview

Использование

import flet as ft
from flet_camera import CameraWebView


def main(page):
    cam = CameraWebView(page)
    
    def save(e):
        image = cam.get_image_bytes()
        if image:
            with open("photo.jpg", "wb") as f:
                f.write(image)

    page.add(
        ft.Column(
            [
                ft.Stack(
                    [
                        ft.Container(
                            content=cam,
                            border_radius=150,  # 🎯 закругление — круг!
                            clip_behavior=ft.ClipBehavior.HARD_EDGE,
                            alignment=ft.alignment.center,
                            bgcolor=ft.colors.BLACK
                        )
                    ],
                    width=300,
                    height=300,
                    expand=False
                ),
                ft.ElevatedButton(
                    "📸 Снимок",
                    on_click=save,
                    width=160,
                    height=48,
                    style=ft.ButtonStyle(
                        shape=ft.RoundedRectangleBorder(radius=25),
                        padding=20
                    )
                )
            ],
            alignment=ft.MainAxisAlignment.CENTER,
            horizontal_alignment=ft.CrossAxisAlignment.CENTER
        )
    )



ft.app(target=main, view=ft.WEB_BROWSER)

Metadata

Release files for flet-camera-webview 0.1.4

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-camera-webview 0.1.4
File Size Uploaded Provenance Actions
flet_camera_webview-0.1.4.tar.gz 4.7 kB Without provenance Details for flet_camera_webview-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flet-camera-webview 0.1.4
File Interpreter ABI Platform Actions
flet_camera_webview-0.1.4-py3-none-any.whl Python 3 none any Details for flet_camera_webview-0.1.4-py3-none-any.whl

Total release size: 9.8 kB

Release files / flet_camera_webview-0.1.4.tar.gz

Download URL flet_camera_webview-0.1.4.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d9137e170ef9d0478b8722b467275866a75b6a2f8e99c2c7b5b334cf816a457d
BLAKE2b-256 checksum
How to use checksums
19231fa2c910fd1419c9c1ba53ef549209a671be42bf52cc243c92b8cb477b47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.12

Release files / flet_camera_webview-0.1.4-py3-none-any.whl

Download URL flet_camera_webview-0.1.4-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54f5b43360de501ae17d31e567de88327b873622e76354d9d5e074ddcf301397
BLAKE2b-256 checksum
How to use checksums
b0e7cf897708fede4fe60460f10fc51b6e1d8ffbc38d96b711f850b282d6edc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.12

Security for flet-camera-webview 0.1.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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