This release is a pre-release and may not be stable for production use.
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, denoted 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
local development environment
Please make sure you are in a clean virtualenv.
$ git clone https://github.com/etalab/cada
$ cd cada
$ docker-compose up -d
$ pip install -e .
$ wget https://cada.data.gouv.fr/export -O data.csv
$ cada load data.csv
$ cada reindex
$ 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. e.g. sessions.openssl rand -hex 24should be a good start.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)
- Nothing yet
1.0.0 (2019-07-19)
- Add a
burnthemallcommand #25 - Use
tqdmfor major commands with loops #25 - Python 3 #28
- Elastic Search 7.2 #29
- Mongo 4.1 #29
- Improved pseudonymization #32
- Display sample of api calls #33
- Fix text query #33
0.2.1 (2019-07-15)
- Fix advice part roman numerals handling #13
- Colorize advices labels #14
- Fixes about page #11
- Fix the cli encoding handling as well as some formatting issues #18
- Footer fixes (svg logo, alignments, https links) #20
- Upgrade jQuery, Bootstrap and Flatly assets and fixes responsive layout #21
- Fix unicode issue #26
0.2.0 (2018-10-05)
- Upgrade stack to latest dependencies (Flask 1.0 with
flask.cli, pytest...) #6 - Test and fix alert mails #7
- Added "about" page #9
- Handle type IV advices #10
0.1.0 (2014-04-14)
- Initial release
Metadata
Release files for cada 1.0.1.dev130
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cada-1.0.1.dev130-py3-none-any.whl | Python 3 | none | any | Details for cada-1.0.1.dev130-py3-none-any.whl |
Release files / cada-1.0.1.dev130-py3-none-any.whl
| Download URL | cada-1.0.1.dev130-py3-none-any.whl |
|---|---|
| Size | 436.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d00bd56fe0e9d23c285b236a5e8cf4aea35bbb381890f393ccf3869db38d491
|
|
BLAKE2b-256 checksum How to use checksums |
ad7efef19eb4c0b6ef07612f47804fd412be7eb6f80c51d7523b40ba2e2a7287
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9
|
Security for cada 1.0.1.dev130
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.