Skip to main content

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

influenzanet_surveys-1.2.0.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

influenzanet_surveys-1.2.0-py3-none-any.whl (53.9 kB view details)

Uploaded Python 3

File details

Details for the file influenzanet_surveys-1.2.0.tar.gz.

File metadata

  • Download URL: influenzanet_surveys-1.2.0.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for influenzanet_surveys-1.2.0.tar.gz
Algorithm Hash digest
SHA256 dd1913afa82271ef842550f029f2740a74f8aadce27bc0447246d36921252f2f
MD5 083f2b3b05ff253097adabc7c58f1d82
BLAKE2b-256 5ed4a18feecd4ab61979d70b3fb735346b01908ac6954f1ac9e0a3137a44b068

See more details on using hashes here.

File details

Details for the file influenzanet_surveys-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for influenzanet_surveys-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 401f37e0a9df892b81fa18c1756c6ebddf5d0651d4041a3207a4f0edacdb6106
MD5 9fb050b9bf2a143716a47c4c7398c927
BLAKE2b-256 5cbef5aa9b8f04f3ddb6f8b30c2d1b4e6dac0f59d41c03cf91845e17d8b90f5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page