Search and consult CADA advices
Project description
CADA
A simplistic interface to search and consult CADA advices.
This is the engine behind https://cada.data.gouv.fr.
Compatibility
CADA has been tested on Python 2.7, MongoDB 3.2 and ElasticSearch 2.4.
The ElasticSearch ICU Analysis plugin is required.
You can install it with:
bin/plugin install analysis-icu
Installation
You can install Cada with pip:
$ pip install cada
You need to create the cada working directory, designed by $HOME in this documentation:
$ mkdir -p $HOME && cd $HOME
$ vim cada.cfg # See configuration
$ wget https://cada.data.gouv.fr/export -O data.csv
$ cada load data.csv # Load initial data
$ cada static # Optional: collect static assets for proper caching
$ cada runserver
Configuration
All configuration is done through the cada.cfg file in $HOME.
It's basically a Python file with constants defined in it:
SERVER_NAME: the public server name. Mainly used in emails.SECRET_KEY: the common crypto hash.Used for session by exemple.ELASTICSEARCH_URL: the ElasticSearch server URL inhost:portformat. Default tolocalhost:9200if not setMONGODB_SETTINGS: a dictionary to configure MongoDB. Default to{'DB': 'cada'}. See the official flask-mongoengine documentation for more details.
Mails
Mail server configuration is done through the following variables:
MAIL_SERVER: SMTP server hostname. Default tolocalhost.MAIL_PORT: SMTP server port. Default to25.MAIL_USE_TLS: activate TLS. Default toFalse.MAIL_USE_SSL: activate SSL. Default toFalse.MAIL_USERNAME: optional SMTP server username.MAIL_PASSWORD: optional SMTP server password.MAIL_DEFAULT_SENDER: Sender email used for mailings. Default tocada@localhost.ANON_ALERT_MAIL: destination mail for anonymisation alerts. Default tocada.alert@localhost.
See the official Flask-Mail documentation for more details.
Sentry
There is an optional support for Sentry. You need to install the required dependencies:
$ pip install raven[flask]
# Or to install it with cada
$ pip install cada[sentry]
You need to add your Sentry DSN to the configuration
SENTRY_DSN = 'https://xxxxx:xxxxxx@sentry.mydomain.com/id'
Piwik
There is an optional Piwik support. You simply need to add your Piwik server URL and your Piwik project ID to the configuration:
PIWIK_URL = 'piwik.mydomain.com'
PIWIK_ID = X
Current (in progress)
- Upgrade stack to latest dependencies (Flask 1.0 with
flask.cli, pytest...) #6 - Test and fix alert mails #7
0.1.0 (2014-04-14)
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cada-0.2.0.dev21-py2-none-any.whl.
File metadata
- Download URL: cada-0.2.0.dev21-py2-none-any.whl
- Upload date:
- Size: 408.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b58070601a02541493af507cf3bcc51ca27068636ccb68375cdae678c870b76
|
|
| MD5 |
3e493b2e3ac46fd77153e84d216284ca
|
|
| BLAKE2b-256 |
9f7bd23520275b4274e47834b04267ddc724f7caad81eeacceca65293db38e22
|