Skip to main content

A simple Django application to store and show webcam snapshots

Project description

django-eremaea2

Build Status PyPI version

django-eremaea2 is a simple Django application to store and manage webcam image snapshots. The application is built on top of django-rest-framework and provides REST API to access the files.

There are three kind of resources available through REST API interface. A collection is a collection of snapshots. A snapshot is image file in essence. For any snapshot there is a retention policy associated with to specify how long store the file.

Installation

The following prerequisites are required to operate django-eremaea2:

To use django-eremaea2 in your django project, include the following code into your settings.py:

INSTALLED_APPS = (
     #...
    'rest_framework',
    'eremaea',
)

Into your urls.py you have to add the following:

urlpatterns = patterns('',
    #...
    url(r'^eremaea/', include('eremaea.urls')),
)

Configuration

The whole configuration is stored into the project database, there is not separate dedicated config file.

The RetentionPolicy model has two parameters: a lookup field name and duration that specifies time-to-live for associated objects. To perform actual cleanup a POST request to the endpoint http://example.com/eremaea/retention_policies/{name}/purge is required. The Collection model has two parameters: a lookup field name and default_retention_policy. The Snapshot model has the following field: associated collection and retention_policy, file object, and auto-now date. New images are uploaded by POST request to the endpoint http://example.com/eremaea/snapshots/?collection=collection_name&retention_policy=retention_policy_name. The latest query parameter is optional one.

The other ways to configure the application are Django fixtures, Django admin interface, django-rest-framework web browsable interface, and REST API itself.

Authentication and permissions

You may utilise all possible options provided by django-rest-framework. See Tutorial for reference.

Caching

You may utilise all caching mechanisms provided by Django framework. See Django's cache framework.

Feedback

If you have any questions, issues, or pull-requests, you are welcome to use GitHub infrastructure.

License

Copyright (c) 2016, Matwey V. Kornilov

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

django_eremaea2-2.1.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

django_eremaea2-2.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file django_eremaea2-2.1.0.tar.gz.

File metadata

  • Download URL: django_eremaea2-2.1.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for django_eremaea2-2.1.0.tar.gz
Algorithm Hash digest
SHA256 4cd7e529759b8cc27dd7f8f0e06079056e07fab0aedd9b8e3b3258e91c2979dd
MD5 634ce627d69c5b2e69619478b6988238
BLAKE2b-256 d1624c371f3d0ba32b8dd1cde429bf5d4fcea6ddb75337dbd60e3315e480382e

See more details on using hashes here.

File details

Details for the file django_eremaea2-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_eremaea2-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3872b66eb643cce00dc3754b9c4040db03f748bf26336f7a3e4ada27852cf293
MD5 c9623d849b7ee626355adef0d9501b10
BLAKE2b-256 5cfb932246ceb20943cd80f1ab02e771ba23655acf9c107ebe3a31e545a57863

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