rpft


Namerpft JSON
Version 1.15.0 PyPI version JSON
download
home_pageNone
SummaryToolkit for using spreadsheets to create and modify RapidPro flows
upload_time2025-07-31 11:54:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords rapidpro flow tools toolkit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RapidPro Flow Toolkit

Toolkit for using spreadsheets to create and modify RapidPro flows.

# Quickstart

```sh
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
- `save_data_sheets`: save input spreadsheets as nested JSON using content index - an experimental feature that is likely to change.

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

```sh
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.

```sh
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`.

```sh
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
1. Import the `create_flows` function
1. Call `create_flows` to convert spreadsheets to flows

```python
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:

- [RapidPro sheet specification]
- [New features documentation]

# 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.


[development]: docs/development.md
[RapidPro sheet specification]: https://docs.google.com/document/d/1m2yrzZS8kRGihUkPW0YjMkT_Fmz_L7Gl53WjD0AJRV0/edit?usp=sharing
[New features documentation]: https://docs.google.com/document/d/1Onx2RhNoWKW9BQvFrgTc5R5hcwDy1OMsLKnNB7YxQH0/edit?usp=sharing
[setup instructions]: docs/google.md
[Logging]: docs/logging.md

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rpft",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "rapidpro, flow, tools, toolkit",
    "author": null,
    "author_email": "IDEMS International <contact@idems.international>",
    "download_url": "https://files.pythonhosted.org/packages/aa/be/16f3f383b03ccf9af0fba359efa10afe0387f0f073207eeb9969e875b8f5/rpft-1.15.0.tar.gz",
    "platform": null,
    "description": "# RapidPro Flow Toolkit\n\nToolkit for using spreadsheets to create and modify RapidPro flows.\n\n# Quickstart\n\n```sh\npip install rpft\nrpft --help\n```\n\n# Command Line Interface (CLI)\n\nThe CLI supports the following subcommands:\n\n- `create_flows`: create RapidPro flows (in JSON format) from spreadsheets using content index\n- `flows_to_sheets`: convert RapidPro flows (in JSON format) into spreadsheets\n- `convert`: save input spreadsheets as JSON\n- `save_data_sheets`: save input spreadsheets as nested JSON using content index - an experimental feature that is likely to change.\n\nFull details of the available options for each can be found via the help feature:\n\n```sh\nrpft <subcommand> --help\n```\n\n## Examples\n\nBelow 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.\n\n```sh\ncd tests/input/example1\nPYTHONPATH=. rpft create_flows \\\n  --output flows.json \\\n  --datamodels=nestedmodel \\\n  --format=csv \\\n  csv_workbook\n```\n\nThe following is an example of the `flows_to_sheets` operation, essentially the reverse of `create_flows`.\n\n```sh\nmkdir output\nrpft flows_to_sheets tests/output/all_test_flows.json output --strip_uuids\n```\n\n# Using the toolkit in other Python projects\n\n1. Add the package `rpft` as a dependency of your project e.g. in requirements.txt or pyproject.toml\n1. Import the `create_flows` function\n1. Call `create_flows` to convert spreadsheets to flows\n\n```python\nfrom rpft.converters import create_flows\n\nsources = [\"workbook.xlsx\", \"csv_workbook\"]\ncreate_flows(\n    sources, \"flows.json\", \"csv\", data_models=\"your_project.models\"\n)\n```\n\n_It should be noted that this project is still considered beta software that may change significantly at any time._\n\n# RapidPro flow spreadsheet format\n\nThe expected contents of the input spreadsheets is documented separately:\n\n- [RapidPro sheet specification]\n- [New features documentation]\n\n# Google Sheets integration\n\nThe toolkit can fetch spreadsheets from Google Sheets. See the [setup instructions] for details.\n\n# Logging\n\nTo override the default logging configuration, see [Logging].\n\n# Development\n\nFor instructions on how to set up your development environment for developing the toolkit, see the [development] page.\n\n\n[development]: docs/development.md\n[RapidPro sheet specification]: https://docs.google.com/document/d/1m2yrzZS8kRGihUkPW0YjMkT_Fmz_L7Gl53WjD0AJRV0/edit?usp=sharing\n[New features documentation]: https://docs.google.com/document/d/1Onx2RhNoWKW9BQvFrgTc5R5hcwDy1OMsLKnNB7YxQH0/edit?usp=sharing\n[setup instructions]: docs/google.md\n[Logging]: docs/logging.md\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Toolkit for using spreadsheets to create and modify RapidPro flows",
    "version": "1.15.0",
    "project_urls": {
        "Homepage": "https://github.com/IDEMSInternational/rapidpro-flow-toolkit",
        "Repository": "https://github.com/IDEMSInternational/rapidpro-flow-toolkit"
    },
    "split_keywords": [
        "rapidpro",
        " flow",
        " tools",
        " toolkit"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a73994593cc919cde17441bf62d244956f7f94f94459dde94f0740781c1d75e8",
                "md5": "1bb70326344a20a9bcf096b9d7f5ea23",
                "sha256": "815044b81b3e3278e0d9f0233ac8868c7108bf3569d0aeb9e52224909e667619"
            },
            "downloads": -1,
            "filename": "rpft-1.15.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1bb70326344a20a9bcf096b9d7f5ea23",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 77464,
            "upload_time": "2025-07-31T11:54:54",
            "upload_time_iso_8601": "2025-07-31T11:54:54.652576Z",
            "url": "https://files.pythonhosted.org/packages/a7/39/94593cc919cde17441bf62d244956f7f94f94459dde94f0740781c1d75e8/rpft-1.15.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aabe16f3f383b03ccf9af0fba359efa10afe0387f0f073207eeb9969e875b8f5",
                "md5": "88562702dd04b55b0d3561534f8e9dba",
                "sha256": "8bece7779e4c5747f9f77b4f4a9b1ee83f0c087de7a19aa05d4da26f6fe0df3c"
            },
            "downloads": -1,
            "filename": "rpft-1.15.0.tar.gz",
            "has_sig": false,
            "md5_digest": "88562702dd04b55b0d3561534f8e9dba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 168985,
            "upload_time": "2025-07-31T11:54:56",
            "upload_time_iso_8601": "2025-07-31T11:54:56.431961Z",
            "url": "https://files.pythonhosted.org/packages/aa/be/16f3f383b03ccf9af0fba359efa10afe0387f0f073207eeb9969e875b8f5/rpft-1.15.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-31 11:54:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IDEMSInternational",
    "github_project": "rapidpro-flow-toolkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rpft"
}
        
Elapsed time: 2.06196s