- Python 85.4%
- HTML 10.9%
- JavaScript 3.3%
- Mako 0.2%
- CSS 0.2%
PyArtistsGallery
PyPI PyPI PyPI PyPI
About PyArtistsGallery
There is standalone web-gallery for arts and photos. Based on Python 3, Flask and SQLite.
I have searched for small standalone web-gallery without big monsters like MySQL in dependencies (because I cannot run MySQL in my RaspberryPi without liters of liquid nitrogen). I found bunch of galleries, like sfpg (https://sye.dk/sfpg/), but they looks not so nice for me or generate thumbnails for new pictures then user tries to load main page of gallery.
That's why I wrote my own gallery, which looks like I want and do what I want.
Repository status:
masterbranch: Build Status Coverage Status Code Health Requirements Statusdevelopbranch: Build Status Coverage Status Code Health Requirements Status
Requirements
- Python 3.3+
- Pillow
- python3-dev
- libjpeg-dev
- zlib1g-dev
- flask
- flask-wtf
- flask-sqlalchemy
- flask-login
- flask-migrate
- flask-script
- uWSGI
Install requirements for Pillow before you install pip and virtualenv as described below.
Installation
- Install pip and virtualenv.
- Create virtualenv (
virtualenv -p python3.x .), and activate it (source bin/activate). - Install PyArtistsGallery via
pip install PyArtistsGallery. Application will be installed in thevirtualenv/lib/python3.x/site-packages. I will refer to this path as/path/to/site-packages/
uWSGI
Execute uWSGI server with next command (virtualenv should be activated):
uwsgi --ini /path/to/site-packages/pagapp.ini
Nginx
There is configuration for Nginx (assume, you cloned this repository to the /usr/share/nginx/www/artgallery):
server {
listen 8080;
server_name "server.example";
client_max_body_size 50M;
access_log /path/to/access.log;
error_log /path/to/error.log;
location /static {
alias /path/to/site-packages/static;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi-pagapp.sock;
}
}
After adding this configuration - do not forget to restart Nginx.