Skip to main content

A Python package to create XForms for ODK Collect.

Project description

circleci appveyor codecov

https://img.shields.io/badge/code%20style-black-000000.svg

pyxform is a Python library that makes writing XForms for ODK Collect and enketo easy by converting XLS(X) spreadsheets into XForms. It is used as a library in a number of tools including the ODK online converter and Ona.

XLS(X) documents used as input must follow to the XLSForm standard and the resulting output follows the ODK XForms standard.

pyxform is a major rewrite of xls2xform.

Running the latest release of pyxform

For those who want to convert forms at the command line, the latest official release of pyxform can be installed using pip:

pip install pyxform

The xls2xform command can then be used:

xls2xform path_to_XLSForm [output_path]

pyxform can be run with either Python 2 or Python 3. Continuous integration runs tests on both Python generations to ensure continued compatibility.

Running pyxform from local source

Note that you must uninstall any globally installed pyxform instance in order to use local modules. Please install java 8 or newer version.

From the command line:

python setup.py develop
python pyxform/xls2xform.py path_to_XLSForm [output_path]

Consider using a virtualenv and virtualenvwrapper to make dependency management easier and keep your global site-packages directory clean:

pip install virtualenv
pip install virtualenvwrapper
mkvirtualenv local_pyxform                     # or whatever you want to name it
(local_pyxform)$ python setup.py develop       # install the local files
(local_pyxform)$ python pyxform/xls2xform.py --help
(local_pyxform)$ xls2xform --help              # same effect as previous line
(local_pyxform)$ which xls2xform.              # ~/.virtualenvs/local_pyxform/bin/xls2xform

To leave and return to the virtual environment:

(local_pyxform)$ deactivate                    # leave the virtualenv
$ xls2xform --help
# -bash: xls2xform: command not found
$ workon local_pyxform                         # reactivate the virtualenv
(local_pyxform)$ which xls2xform               # & we can access the scripts once again
~/.virtualenvs/local_pyxform/bin/xls2xform

Installing pyxform from remote source

pip can install from any GitHub repository:

pip install git+https://github.com/XLSForm/pyxform.git@master#egg=pyxform

You can then run xls2xform from the commandline:

xls2xform path_to_XLSForm [output_path]

Testing

To make sure the install worked out, you can do the following:

pip install nose==1.0.0

cd your-virtual-env-dir/src/pyxform

nosetests

Documentation

To check out the documentation for pyxform do the following:

pip install Sphinx==1.0.7

cd your-virtual-env-dir/src/pyxform/docs

make html

Change Log

Changelog

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 Distribution

pyxform-0.14.0.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

pyxform-0.14.0-py2.py3-none-any.whl (2.0 MB view details)

Uploaded Python 2Python 3

File details

Details for the file pyxform-0.14.0.tar.gz.

File metadata

  • Download URL: pyxform-0.14.0.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using 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.7.3

File hashes

Hashes for pyxform-0.14.0.tar.gz
Algorithm Hash digest
SHA256 c27e9de05557fec162178ee549403f4abe77a93c08c82e3857dfd7f93f0b7e11
MD5 49194c6cbe05b681e41a0fa2db2af5c9
BLAKE2b-256 b1ecca4ea0e89122d6c42e6d93b2184a2782a02ef3c10ea25d698bae437ebabd

See more details on using hashes here.

File details

Details for the file pyxform-0.14.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pyxform-0.14.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 2, Python 3
  • Uploaded using 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.7.3

File hashes

Hashes for pyxform-0.14.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 73d5f00506613c605ac3d0255e936f143333e4fccc39db05f585f90b7c4d0dc8
MD5 09aa95a58275efe69210bf69507e97e2
BLAKE2b-256 cafc499cd3c54b67df21f0310fb9eef1ce152141e67cf5ba86559c1960da3325

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