Skip to main content

Simple Raspberry Pi camera http server interface

Project description


Python simple Raspberry-Pi camera module web interface

PyPI version License: GPL v3

This software runs on a RPi, it starts a webserver accessible via it's IP address. The web interface has a preview screen, buttons to take picture, download and delete images.

picamip UI


Install with pip

pip install picamip


The software can be started with

$ picamip

Then go to the interface at http://<Raspberry IP address>:8000

Additional options may be passed to the program:

picamip --help
usage: picamip [-h] [-p PICTURE_DIR] [-f FILES_PREFIX] [-t FLASK_TEMPLATE]
               [-s FLASK_STATIC] [-o FLASK_OVERLOAD] [-d DEFAULT_ROUTE] [-v]
               [host] [port]

picamip: Python simple Raspberry-Pi camera module web interface

positional arguments:
  host                  Server host
  port                  Server port

optional arguments:
  -h, --help            show this help message and exit
  -p PICTURE_DIR, --picture-dir PICTURE_DIR
                        Pictures storage directory
  -f FILES_PREFIX, --files-prefix FILES_PREFIX
                        Directory to store the pictures. Default: ~/Pictures
  -t FLASK_TEMPLATE, --flask-template FLASK_TEMPLATE
                        Flask additional jinja2 templates directory,
                        overwrites defaults.
  -s FLASK_STATIC, --flask-static FLASK_STATIC
                        Flask additional static files directory, overwrites
  -o FLASK_OVERLOAD, --flask-overload FLASK_OVERLOAD
                        Flask app functions overload.
  -d DEFAULT_ROUTE, --default-route DEFAULT_ROUTE
                        Default root route. Eg: index.html
  -v, --version         show program's version number and exit


It's possible to customize the frontend by specifying another static and template directories with: --flask-static and --flask-template.

Endpoints may be customized by declaring callback functions into a python script and using --flask-overload. Overload functions must start with overload and they receive an instance of flask.Flask (app ) and an instance ofpicamip.StreamPiCamera (camera).


Default endpoints are:

  • / - GET: root route
  • /files - GET: Gets the current storage indexes and filenames
  • /stream - GET: Camera preview (mjpeg)
  • /picture - GET: Gets an image of given index
    • Query params: index (int) - picture index, download (bool)- Downloads the image
  • /picture - POST: Takes a picture from the camera
    • Query params: download (bool)- Downloads the image
  • /downloadAll - GET: Downloads all the images as a zip file
  • /deleteAll - DELETE: Deletes all images
  • /delete - DELETE: Deletes an image of given index
    • Query params: index (int) - picture index
  • /shutdown - POST: Shuts down the Raspberry Pi


Python simple Raspberry-Pi camera module web interface Copyright (C) 2021 Luiz Eduardo Amaral

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see

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

picamip-1.2.0b0.tar.gz (607.1 kB view hashes)

Uploaded Source

Built Distribution

picamip-1.2.0b0-py3-none-any.whl (394.4 kB view hashes)

Uploaded Python 3

Supported by

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