{"id":28325314,"url":"https://github.com/altest-com/dnfas-api","last_synced_at":"2026-04-18T19:33:34.317Z","repository":{"id":53666899,"uuid":"250309756","full_name":"altest-com/dnfas-api","owner":"altest-com","description":"A django-based api server for the Dnfas project","archived":false,"fork":false,"pushed_at":"2021-03-19T23:14:45.000Z","size":15756,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-03T00:18:09.953Z","etag":null,"topics":["django","django-rest-framework","face-detection","face-recognition","image-processing","video-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/altest-com.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-26T16:19:40.000Z","updated_at":"2020-04-10T00:02:51.000Z","dependencies_parsed_at":"2022-08-27T06:20:31.631Z","dependency_job_id":null,"html_url":"https://github.com/altest-com/dnfas-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/altest-com/dnfas-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altest-com%2Fdnfas-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altest-com%2Fdnfas-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altest-com%2Fdnfas-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altest-com%2Fdnfas-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/altest-com","download_url":"https://codeload.github.com/altest-com/dnfas-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altest-com%2Fdnfas-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31982743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-rest-framework","face-detection","face-recognition","image-processing","video-processing"],"created_at":"2025-05-25T20:12:29.395Z","updated_at":"2026-04-18T19:33:34.275Z","avatar_url":"https://github.com/altest-com.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: ./images/logo.svg\n\n\n.. raw:: html\n\n    \u003cdiv align=\"center\"\u003e\n      \u003ch1\u003eDnfas\u003c/h1\u003e\n    \u003c/div\u003e\n\n|Build Status| |Test Coverage| |Python Version| |Contributions Welcome| |License|\n\n.. |Build Status| image:: https://travis-ci.com/raikel/dnfas.svg?branch=master\n   :target: https://travis-ci.com/raikel/dnfas\n.. |Test Coverage| image:: https://codecov.io/gh/raikel/dnfas/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/raikel/dnfas\n.. |Python Version| image:: https://img.shields.io/badge/python-v3.7+-blue.svg\n   :target: http://shields.io/\n.. |Contributions Welcome| image:: https://img.shields.io/badge/contributions-welcome-orange.svg\n   :target: http://shields.io/\n.. |License| image:: https://img.shields.io/badge/license-MIT-blue.svg\n   :target: https://opensource.org/licenses/MIT\n\n\nA headless face analytics platform built on top of `dnfal \u003chttps://github.com/raikel/dnfal\u003e`_ library.\n\nInstallation\n=============\n\nThe following instructions are for installing Dnfas in Ubuntu 18.04 or newer. Installing on other system may work, but it has not been tested.\n\nPrerequisites\n-------------\n\nBefore you are ready to run Dnfas, you will need to install the additional software on your computer. To install them, type:\n\n.. code-block:: bash\n\n    sudo apt update\n    sudo apt install git python3-venv python3-dev pyhton3-apt\n\nPython virtual environment\n--------------------------\n\nWe recommend to run Dnfas within a newly created virtual environment for easier management. To create a new Python virtual environment and activate it, run the following commands within a directory of your choice:\n\n.. code-block:: bash\n\n    python3 -m venv pyenv\n    source pyenv/bin/activate\n    \nNext, install python dependencies:\n\n.. code-block:: bash\n\n    pip install wheel ansible\n    \nNext, change to a directory where you wish to install Dnfas and clone the repository:\n\n.. code-block:: bash\n\n    git clone https://github.com/raikel/dnfas.git\n    cd dnfas\n    \nAfter that, you can install python dependencies by running:\n\n.. code-block:: bash\n\n    pip install -r requirements.txt\n\nSetting up the project database\n-------------------------------\n\nNext step is to create a new database and user in Postgres. We provide a small script to quickly accomplish this task. Within Dnfas project root dir, type:\n\n.. code-block:: bash\n\n    bash dbinit.sh \\\n        --pguser=${PG_USER} \\\n        --pgpass=${PG_PASS} \\\n        --dbname=${DB_NAME} \\\n        --dbuser=${DB_USER} \\\n        --dbpass=${DB_PASS} \n\nWhere ``${PG_USER}`` is a Postgres user with super-user privileges, ``${PG_PASS}`` is the password of ``${PG_USER}``, and ``${DB_NAME}``, ``${DB_USER}`` and ``${DB_PASS}`` are the project database name, user and password, respectively. You can also set up the database by issuing the following commands in a Postgres session:\n\n.. code-block:: bash\n\n    DROP DATABASE IF EXISTS ${DB_NAME};\n    CREATE DATABASE ${DB_NAME};\n    DROP USER IF EXISTS ${DB_USER};\n    CREATE USER ${DB_USER} WITH PASSWORD '${DB_PASS}';\n    ALTER ROLE ${DB_USER} SET client_encoding TO 'utf8';\n    ALTER ROLE ${DB_USER} SET default_transaction_isolation TO 'read committed';\n    ALTER ROLE ${DB_USER} SET timezone TO 'UTC';\n    GRANT ALL PRIVILEGES ON DATABASE ${DB_NAME} TO ${DB_USER};\n\nConfiguration\n-------------\n\nTo configure Dnfas runtime parameters, set the following environment variables:\n\n=======================     ===========\nVariable name               Description\n=======================     ===========\nDJANGO_SETTINGS_MODULE      Module for Django settings. Can be \"dnfas.settings.production\", \"dnfas.settings.development\" or \"dnfas.settings.testing\".\nDNFAS_ALLOWED_HOSTS         A comma separated list of allowed hosts, for example \"192.168.5.3, 192.168.5.4\".\nDNFAS_SECRET_KEY            Application secret key.\nDNFAS_DB_NAME               Application database name.\nDNFAS_DB_USER               Application database user name.\nDNFAS_DB_PASSWORD           Application database password.\nDNFAS_DB_HOST               Application database host. Optional (default=\"localhost\").\nDNFAS_SPA_DIR               Root directory of Single Page Application (SPA) files. Optional (default=\"\").\nDNFAS_WORKER_NAME           Name of the current Dnfas instance when used as cluster node. Optional (default=\"master\")\n=======================     ===========\n    \nA configuration file with all environments variables is also provided in the project. You can find it at `deploy/dnfas.conf` under the project root directory. To use, save it to a known location and edit its content, for example:\n\n.. code-block:: bash\n\n    sudo cat deploy/dnfas.conf \u003e\u003e /etc/dnfas/dnfas.conf\n    nano /etc/dnfas/dnfas.conf\n    \nThen set the configuration variables to appropriated values.\n\nApplication initialization\n--------------------------\n\nWith configuration parameters set up and within the project virtual environment, run the following command inside the project root directory to prepare the database:\n\n.. code-block:: bash\n\n    python manage.py migrate\n    \nNext, to start the development server, type:\n\n.. code-block:: bash\n\n    python manage.py runserver\n\nServing with nginx and gunicorn\n-------------------------------\n\nRunning Dnfas with the default server builtin with Django is a good way to start getting familiarized with the project. After that, however, you may want to run it with a higher performance server. Next, we describe how to setup Gunicorn and Nginx to serve Dnfas. Gunicorn will serve as an interface to Dnfas, translating client requests from HTTP to Python calls that our application can process. Nginx will be setup in front of Gunicorn to take advantage of its high performance connection handling mechanisms.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltest-com%2Fdnfas-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltest-com%2Fdnfas-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltest-com%2Fdnfas-api/lists"}