Skip to main content

cæstudy. DonationFlow CLI

A command-line bridge for importing external donation data into NationBuilder with auditable output, source-specific adapters, and safe rollback support.

  • Purpose — Move CanadaHelps and PayPal exports into NationBuilder without rebuilding your upstream payment workflow.
  • Architecture — Adapters map source exports, plugins encode organization rules, and job artifacts preserve an audit trail.
  • Operational posture — Verbose logging, success and fail CSVs, and rollback tooling make import runs inspectable rather than opaque.

DonationFlow CLI is a command-line tool for importing donation data from external sources like CanadaHelps and PayPal into your NationBuilder account. It is designed to be a bridge for organizations that use payment processors not natively integrated with NationBuilder, or for those migrating from other CRM platforms.

DonationFlow CLI is extensible to other payment processor sources through an existing adapter template and a plugin architecture through which organization-specific business rules can be implemented.

DonationFlow CLI was originally developed to help a non-profit charitable organization successfully migrate their donation data from CiviCRM and integrate their existing PayPal and CanadaHelps workflows with NationBuilder.

System Profile

Core capabilities

  • Import from External Sources: Import donation data from CanadaHelps and PayPal CSV exports.
  • Extensible Design: Adapt to other payment platforms using the generic adapter and plugin hooks. Plugins are enabled per adapter through an explicit plugins.yaml whitelist beside the plugin files — filenames carry no enabled/disabled meaning.
  • Detailed Logging: Human-readable console output plus a single rotating log file capture every import job operation for troubleshooting and auditing; on macOS, --log-os-log mirrors logs to Console.app.
  • Rollback Capable: Remove imported transactions when a run needs to be reversed.

Typical use case — Use DonationFlow when your fundraising data originates outside NationBuilder but needs to land there with repeatable transforms, deterministic outputs, and a paper trail that operations staff can review later.

Prerequisites

  • Python 3.9+
  • A NationBuilder account with API access.
  • A configured NationBuilder OAuth application.
  • Donation data exported as CSV files from CanadaHelps or PayPal.

Installation

Create an environment and activate

python3 -m venv <my-environment-name>
source <my-environment-name>/bin/activate

Install using PIP

pip install cdflow-cli

For development installation, please see the Contribution Guide.

Quick Start

  1. Initialize configuration: Run cdflow init to create template files:

    • ~/.config/caestudy/local.yaml - Main configuration file (default location)
    • ~/.env/nb_local.env - OAuth environment variables template (non-configurable location)
  2. Configure OAuth credentials: Edit ~/.env/nb_local.env with your NationBuilder OAuth credentials, then load:

    Locate the load-secrets.sh script

    python3 -c "import cdflow_cli; from pathlib import Path; print(Path(cdflow_cli.__file__).parent / 'scripts' / 'load-secrets.sh')"
    

    Execute the script using your .env file as the parameter

    source /path/printed/above/load-secrets.sh ~/.env/nb_local.env
    
  3. Update the import configuration: In your configuration file (e.g., local.yaml), update the cli_import section to point to your CSV file(s).

  4. Place your CSV file: Put your CanadaHelps or PayPal CSV file in the cli_source directory you specified in your configuration.

  5. Run the import:

    cdflow import --config /path/to/your/local.yaml
    

    Or with less verbose output

    cdflow import --config /path/to/your/local.yaml --log-level NOTICE
    

    Alternative: Override import settings via CLI flags

    You can override the import type and file path from the config using CLI flags:

    # Override with relative path
    cdflow import --type canadahelps --file donations/emergency.csv --config /path/to/your/local.yaml
    # Override with absolute path
    cdflow import --type paypal --file /tmp/paypal_donations.csv --config /path/to/your/local.yaml
    
  6. Review the results: The tool will provide real-time feedback in the console. After the import is complete, you can review the results in the output directory you specified in your configuration.

    • _success.csv: This file contains all the records that were successfully imported, along with the new NationBuilder Person ID and Donation ID.
    • _fail.csv: This file contains any records that failed to import, along with any error message(s) in the NB Error Message column.
  7. Verify in NationBuilder: Log in to your NationBuilder account and navigate to the Finances section. You should see the newly imported donations in your transaction list.

Documentation

For more detailed information on configuration, usage, plugins, and troubleshooting, please see the full documentation at mkiiim.github.io/cdflow-cli.

Support

Customers and product evaluators can reach out for support at support@caestudy.com.

License

This project is licensed under the Business Source License 1.1 (BSL).

  • Current license: BSL 1.1 with production use restrictions
  • Converts to: Apache 2.0 License on 2029-09-01
  • Full terms: See the LICENSE file for complete details

Contributing

Contributions are welcome! Please note:

Metadata

Release files for cdflow-cli 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdflow-cli 3.0.1
File Size Uploaded Provenance
cdflow_cli-3.0.1.tar.gz 555.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cdflow-cli 3.0.1
File Interpreter ABI Platform
cdflow_cli-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / cdflow_cli-3.0.1.tar.gz

Download URL cdflow_cli-3.0.1.tar.gz
Size 555.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4ba04b64c94baee64676adbef721eabc50bc5d9406b3395012e1c4d0d1ac2509
BLAKE2b-256 checksum
How to use checksums
5deb585ef7b991f7c374e9bedcc31a89cfbca2a4c0fc60acadf8d560dce29640
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / cdflow_cli-3.0.1-py3-none-any.whl

Download URL cdflow_cli-3.0.1-py3-none-any.whl
Size 583.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
817b25b2e2fa41700cd1d711400e0f13c25fde47ed56ff4f394def54a508f8e6
BLAKE2b-256 checksum
How to use checksums
b25f70f78dab0cdb954a43cdaf21bc65768f7ed648511c9c059b78782378460e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for cdflow-cli 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page