Skip to content
Snippets Groups Projects
Select Git revision
  • 9f25aef125de47d1c42828ded95517c73993fbd4
  • python3 default protected
  • feature/exabgp_support2
  • feature/exabgp_support2.bgpextcommunity
  • feature/exabgp_support2.django4.2
  • fix/existingcheck_honor_fragtype
  • feature/python3-authz_netmask
  • feature/authz_netmask
  • fix/wrong_ratelimit_stats
  • feature/requirements_version_update2024-01
  • feature/split_celery
  • feature/improved-warning-mails
  • fix/reenable_expireset_via_restapi
  • feature/admin_user_delete_with_owned_rule_reassigning1
  • feature/admin_user_delete_with_owned_rule_reassigning
  • feature/branded_doc
  • fix/forked_snmp_polling_worker_exit_issue
  • fix/false_user_activation_error
  • feature/exabgp_with_docker-compose
  • fix/prefix_overlap_handling
  • fix/js_security_issues-a
  • save1
  • rpm-1.5-7
  • working1
  • myv1.6
  • t12b1
  • v1.5_newnew2
  • merged_final
  • v1.5_newnew
  • startstop_old
  • myadd2
  • tomas3
  • merge_jra2t6_and_RESTAPI
  • mytomas2
  • mynew1
  • new_jra2t6
  • v1.5_final
  • fod16_ruleroutes-merged_old
  • merged_new
  • v1.6_new_old
  • v1.5_new_old_follower
41 results

fod

Skeleton Web App

Installation Process

Clone this repository using your favorite method, then:

$ python3 -m venv compendium-v2
$ .compendium-v2/bin/activate
$ pip install -r requirements.txt
$ tox -e py39

Overview

This module implements a Flask-based webservice and in-browser React front-end.

The webservice communicates with the front end over HTTP. Responses to valid requests are returned as JSON messages. The server will therefore return an error unless application/json is in the Accept request header field.

Configuration

This app allows specification of a few example configuration parameters. These parameters should be stored in a file formatted similarly to config-example.json, and the name of this file should be stored in the environment variable SETTINGS_FILENAME when running the service.

Building the web application

For instructions on building the React frontend see webapp/README.md.

Running this module

This module has been tested in the following execution environments:

  • As an embedded Flask application. For example, the application could be launched as follows:
$ export FLASK_APP=compendium_v2.app
$ export SETTINGS_FILENAME=config-example.json
$ flask run

See https://flask.palletsprojects.com/en/2.1.x/deploying/ for best practices about running in production environments.

Importing the historical data

Pip install can use the setup.py file to register the click cli commands:

pip install --editable .
survey-publisher-v1
survey-publisher-2022

Creating a db migration after editing the sqlalchemy models

cd compendium_v2
alembic revision --autogenerate -m "description"

Then go to the created migration file to make any necessary additions, for example to migrate data. Also see https://alembic.sqlalchemy.org/en/latest/autogenerate.html#what-does-autogenerate-detect-and-what-does-it-not-detect

Note that starting the application applies all upgrades.