Skip to main content

Toolkit for using spreadsheets to create and modify RapidPro flows

Project description

RapidPro Flow Toolkit

Toolkit for using spreadsheets to create and modify RapidPro flows.

Quickstart

pip install rpft
rpft --help

Command Line Interface (CLI)

The CLI supports the following subcommands:

  • create_flows: create RapidPro flows (in JSON format) from spreadsheets using content index
  • flows_to_sheets: convert RapidPro flows (in JSON format) into spreadsheets
  • convert: save input spreadsheets as JSON

Full details of the available options for each can be found via the help feature:

rpft <subcommand> --help

Examples

Below is a concrete example of a valid execution of the command line tool using create_flows to convert a set of spreadsheets into RapidPro flows. The line breaks are merely for improving readability; the command would also be valid on a single line.

cd tests/input/example1
PYTHONPATH=. rpft create_flows \
  --output flows.json \
  --datamodels=nestedmodel \
  --format=csv \
  csv_workbook

The following is an example of the flows_to_sheets operation, essentially the reverse of create_flows.

mkdir output
rpft flows_to_sheets tests/output/all_test_flows.json output --strip_uuids

Using the toolkit in other Python projects

  1. Add the package rpft as a dependency of your project e.g. in requirements.txt or pyproject.toml
  2. Import the create_flows function
  3. Call create_flows to convert spreadsheets to flows
from rpft.converters import create_flows

sources = ["workbook.xlsx", "csv_workbook"]
create_flows(
    sources, "flows.json", "csv", data_models="your_project.models"
)

It should be noted that this project is still considered beta software that may change significantly at any time.

RapidPro flow spreadsheet format

The expected contents of the input spreadsheets is documented separately:

Google Sheets integration

The toolkit can fetch spreadsheets from Google Sheets. See the setup instructions for details.

Logging

To override the default logging configuration, see Logging.

Development

For instructions on how to set up your development environment for developing the toolkit, see the development page.

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

rpft-1.17.0.tar.gz (176.1 kB view details)

Uploaded Source

Built Distribution

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

rpft-1.17.0-py3-none-any.whl (85.2 kB view details)

Uploaded Python 3

File details

Details for the file rpft-1.17.0.tar.gz.

File metadata

  • Download URL: rpft-1.17.0.tar.gz
  • Upload date:
  • Size: 176.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rpft-1.17.0.tar.gz
Algorithm Hash digest
SHA256 b93bc2d2db17ae3c5bc5e56d15cff90644373c620ed81f2259788401d2f67533
MD5 ee14ef0ee4f5e57ec1e31e930f07b168
BLAKE2b-256 4b84252bac71be404f8e5ab1fa34429fb0112d454123b9a7bfc6b52815a6e00b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpft-1.17.0.tar.gz:

Publisher: release.yml on IDEMSInternational/rapidpro-flow-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rpft-1.17.0-py3-none-any.whl.

File metadata

  • Download URL: rpft-1.17.0-py3-none-any.whl
  • Upload date:
  • Size: 85.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rpft-1.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad00d93299bb52cdf47fc318e2a296d255b99450ff485c7a2130dc035add6321
MD5 a52fd0d131257ba057ea88c593a6d52d
BLAKE2b-256 328c541f42ba62209f2d82eee75480d55a4cb98e1f6af27d270ea14647fc0f9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpft-1.17.0-py3-none-any.whl:

Publisher: release.yml on IDEMSInternational/rapidpro-flow-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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