Influenzanet surveys management library
Project description
Influenzanet Survey Management
influenzanet.surveys is a python library to work with influenzanet surveys, mainly validation and transformation
The purpose of this library is to work with existing surveys in json, it's not designed to create new survey json from scratch (for this use the typescript libraries).
Installation
pip install influenzanet.surveys
# To use validation
pip install influenzanet.surveys[validator]
Features
- Parse json Survey definition into python object
- Parse standards survey definition, standards define the common questions/responses encoding for Influenzanet
- Export survey in several format : html document, readable yaml (see formats)
- Check survey internal consistency (reference for keys) and compliance to a standard definition
Format
- html : view of a survey definition in a static html document (this is survey definition for humans)
- readable : a simplified view of a survey to see survey structure. Expression are transformed into function call-like text to be more readable.
Each format accepts a "context" for the transformation, allowing, for example, to select the languages to be used in the output.
An helper is provided to build html for all json in a directory :
from influenzanet.surveys.html import build_html_from_dir
## Accept glob patterns and transform all surveys json into html (if a json is not a survey it will be ignored)
## Creates an html file in the same directory for each json, replacing existing html if already exists
build_html_from_dir("output/**/surveys", languages=["en","fr"])
Validation and Survey check
TBD
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
Built Distribution
File details
Details for the file influenzanet_surveys-1.0.6.tar.gz
.
File metadata
- Download URL: influenzanet_surveys-1.0.6.tar.gz
- Upload date:
- Size: 35.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93c9a1c5494aff16845c56a0840580a95699d9ea71d3b694e5075ec97a3bc616 |
|
MD5 | fe4ced0a9eeec04eb0f9299fdc5622ce |
|
BLAKE2b-256 | 54eaa7c149964961bf7ac18d9993dfa7d04d149958590aa59d833c4d87772010 |
File details
Details for the file influenzanet.surveys-1.0.6-py3-none-any.whl
.
File metadata
- Download URL: influenzanet.surveys-1.0.6-py3-none-any.whl
- Upload date:
- Size: 44.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f835e2674e7f7f41e5c06d198734c89c58a42a64cdddaa22945823bed1febe06 |
|
MD5 | 8a39af4abfa1b2ba0ec3bacde0b67c58 |
|
BLAKE2b-256 | 85c44fcc81497706cc635932eaa25c5000556038d41fabcb09fe2eaa710b37fd |