semvec/pypi-packages huggingface dataset:
streamlit-image-viewer 0.2.5
streamlit components for image viewer
Requires Python: >=3.9
Keywords: Python,Streamlit,React,TypeScript

# Streamlit Image Viewer

Streamlit component for image viewer.

![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)

[![PyPI](https://img.shields.io/pypi/v/streamlit-image-viewer)](https://pypi.org/project/streamlit-image-viewer/)
[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://st-image-annotation.streamlit.app/)

<img src=demo/demo.gif></img>
# Features
* You can easily view the images in a folder side by side
* Support for displaying images in multiple rows and columns

# Install
```sh
pip install streamlit-image-viewer
```

# Example Usage
```python
from glob import glob
from streamlit_image_viewer import image_viewer
import streamlit as st

st.title("ImageViewer App")
st.title("Sample Images")
image_path_list = glob('../../image/*.jpg') + glob('../../image/*.png') 
image_viewer(image_path_list, ncol=3, nrow=2, key="image_viewer")
```
# Example App
```shell
cd streamlit_image_viewer/ImageViewer
streamlit run app.py
```
# API
```python
image_viewer(
    image_path_list: List[str],
    ncol: int = 2,
    nrow: int = 2,
    image_name_visible: bool = True
    key: Optional[str] = None
)
```
* **image_path_list** : A list containing paths to the images to be displayed.
* **ncol** : The number of columns. Defaults to 2.
* **nrow** : The number of rows. Defaults to 2.
* **image_name_visible** : A boolean indicating whether image names are visible.
* **key** : A unique key for the component. Can be used to distinguish between different components.

## NOTE
* `ncol` and `nrow` should be positive integers; otherwise, a ValueError will be raised.  
This function allows for the effective display of specified images in a grid layout with a customizable number of columns and rows. By default, a 2x2 grid is created, but you can adjust the column and row counts to suit your needs.

# References

* [**Streamlit-Image-Annotation**](https://github.com/hirune924/Streamlit-Image-Annotation/tree/master)  
* [**Streamlit Components Doc**](https://docs.streamlit.io/library/components)  
* [**streamlit-template**](https://github.com/streamlit/component-template)  
* Sample Images are downloaded from  [**Pixabay**](https://pixabay.com/ja/)

# Release note
* 2023/10/19 Release version 0.2.5 Now available for Multi-Page
* 2023/9/22 Release version 0.2.2 Add Modal Image and image name visible/invisible
* 2023/9/22 Release version 0.1.9
* 2023/9/20 Release version 0.1.6
ahoy-dtu-webthing 1.2.22
Ahoy DTU webthing
Requires Python: >=3.8

# ahoy_dtu_webthing
A webthing adapter to provide the [AhyoDTU](https://ahoydtu.de/)  interface via the [webthing API](https://iot.mozilla.org/wot/).

Example
```
# webthing has been started on host 192.168.0.23

curl http://192.168.0.23:7122/0/properties 

{
   "name": "Terrasse",
   "serial": "114180123418",
   "p_dc": 23
   ....
}
```

To install this software you can use [PIP](https://realpython.com/what-is-pip/) package manager as shown below
```
sudo pip install ahoy_dtu_webthing
```

After this installation you can use the Webthing http endpoint in your Python code or from the command line with
```
sudo dtu --command listen --port 7122 --base_uri http://10.1.11.35/
```
Here the webthing API is bound to the local port 7122. Additionally, the base uri of the AhyoDTU REST api must be set. 

As an alternative to the *list* command, you can also use the *register* command to register and start the webthing service as a systemd entity.
This way, the webthing service is started automatically at boot time. Starting the server manually with the *listen* command is no longer necessary.
```
sudo dtu --command register --port 7122 --base_uri http://10.1.11.35/
```