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.18.0.tar.gz (176.2 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.18.0-py3-none-any.whl (85.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rpft-1.18.0.tar.gz
Algorithm Hash digest
SHA256 603f29a04c9e8a1f0101b9e383cef57633deee8b3b47a27b1df077c90a921a37
MD5 586a4ecd036982ef9bcb92972fe3179f
BLAKE2b-256 1c6b55265c7bbd9a20cc115db8121132d351a15bd11d39ed42a66b04bbafe2fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpft-1.18.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.18.0-py3-none-any.whl.

File metadata

  • Download URL: rpft-1.18.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.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1baa77134ed862425e2e02efff994cd5fc5602a921a19d54a90a728458a9e871
MD5 3e6265e326e260d4921a8841b4a8669a
BLAKE2b-256 31af7680d4d8c27426c0861e4a90a7881a93855eac09104b9075e894cf4e31c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rpft-1.18.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