Skip to main content

CacheImage and CacheCircleAvatar control for Flet.

Project description

flet-cacheimg

Cacheimg and CacheCircleAvatar control for Flet.

Warning

Images will only be cached in built packages.

flet build ...

If you run project via

flet run

those controls will act exactly the same as basic ft.Image and ft.CircleAvatar.
This is limitation of the current Flet version (0.28.3).

Usage

import flet as ft
from flet_cacheimg import CacheImage, CacheCircleAvatar


def main(page: ft.Page):
    page.add(
        CacheImage(
            src="https://flet.dev/img/logo.svg",
            width=150,
            height=150,
            tooltip="Cached image",
            opacity=0.9,
        )
    )
    page.add(
        CacheCircleAvatar(
            radius=24,
            foreground_image_src='https://flet.dev/img/logo.svg',
        )
    )
    page.add(
        ft.CircleAvatar(
            radius=20,
            content=CacheImage(
                src='https://flet.dev/img/logo.svg',
                width=40,
                height=40,
                fit=ft.ImageFit.COVER,
            ),
        )
    )


ft.app(main)

Installation

Add dependency to pyproject.toml of your Flet app:

  • Git dependency

Link to git repository:

dependencies = [
  "flet-cacheimg @ git+https://github.com/ReYaNOW/flet-cacheimg",
  "flet>=0.28.3",
]
  • PyPi dependency

If the package is published on pypi.org:

dependencies = [
  "flet-cacheimg",
  "flet>=0.28.3",
]

Build your app:

flet build apk -v

Project details


Download files

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

Source Distribution

flet_cacheimg-0.2.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

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

flet_cacheimg-0.2.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file flet_cacheimg-0.2.1.tar.gz.

File metadata

  • Download URL: flet_cacheimg-0.2.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.4 Windows/10

File hashes

Hashes for flet_cacheimg-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3bd4c1a0937031ca1856ab7f08160b95cf8233f14520698c7b210b1b46dd5e6b
MD5 f1176ecb8da5bd13b76a7542cc7fbb03
BLAKE2b-256 3a653ba77f00777105c6b45f19ec0dce3e1895ee8b5e05769b4c2da52760fe8d

See more details on using hashes here.

File details

Details for the file flet_cacheimg-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: flet_cacheimg-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.4 Windows/10

File hashes

Hashes for flet_cacheimg-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f68d50a7f7735da021c4224e694b04966b50d3c7853cdfcdfff0cc7043c9395
MD5 e1738020e462663550a36cf5789b5c50
BLAKE2b-256 fcd84be2cab3351735a9235802843c82809dd7276a6f91137ba5e1bba7a58316

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page