Metadata-Version: 2.4
Name: photo_burst_detection
Version: 1.5.0
Summary: Flask App for photo burst detection
Author: batou9150
Project-URL: Homepage, https://github.com/batou9150/photo_burst_detection
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Framework :: Flask
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: flask<4,>=3.1
Requires-Dist: flask-login<0.7,>=0.6.3
Requires-Dist: flask-ldap3-login<2,>=1.0.2
Requires-Dist: flask-wtf<2,>=1.3
Provides-Extra: test
Requires-Dist: pytest<10,>=9; extra == "test"

# photo_burst_detection

[![pypi version](https://img.shields.io/pypi/v/photo_burst_detection.svg)](https://pypi.org/project/photo_burst_detection/)

## install

```shell
pip install photo_burst_detection
```

### install from sources

```shell
git clone https://github.com/batou9150/photo_burst_detection.git
cd photo_burst_detection
pip install .
```

## run

### Run with gunicorn (Unix)

```shell
pip3 install gunicorn

export PHOTO_BURST_DETECTION_PATH=<start path>
export SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())')
export LDAP_HOST=ad.mydomain.com
export LDAP_BASE_DN=dc=mydomain,dc=com

gunicorn -b 0.0.0.0:8000 photo_burst_detection:app
```

### Run with waitress (Windows)

```shell
export PHOTO_BURST_DETECTION_PATH=<start path>
export SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())')
export LDAP_HOST=ad.mydomain.com
export LDAP_BASE_DN=dc=mydomain,dc=com

waitress-serve --listen=*:8000 photo_burst_detection:app
```

## tests

```shell
pip install -e '.[test]'
pytest
```

## configuration

| variable                     | description                             |
|------------------------------|-----------------------------------------|
| PHOTO_BURST_DETECTION_CONFIG | config file (optional)                  |
| PHOTO_BURST_DETECTION_PATH   | start path                              |
| SECRET_KEY                   | required, random value                  |
| LDAP_HOST                    |                                         |
| LDAP_PORT                    | (default value = '389')                 |
| LDAP_BASE_DN                 |                                         |
| LDAP_USER_DN                 |                                         |
| LDAP_GROUP_DN                |                                         |
| LDAP_USER_RDN_ATTR           | (default value = 'uid')                 |
| LDAP_USER_LOGIN_ATTR         | (default value = 'uid')                 |
| LDAP_BIND_USER_DN            |                                         |
| LDAP_BIND_USER_PASSWORD      |                                         |
| LDAP_GROUP_OBJECT_FILTER     | (default value = '(objectclass=group)') |
