Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

sbnctech/wa-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WA-Sync

Syncs Wild Apricot data to a local SQLite database for querying and analysis.

What It Does

Fetches data from Wild Apricot API and stores it in data/wa.db:

  • Contacts/Members - All member records with custom fields
  • Events - Event listings and details
  • Registrations - Event registration records
  • Invoices - Payment and invoice data
  • Membership Levels - Level definitions and fees

Quick Start

# Set your API key
export WA_API_KEY="your-api-key"

# Run full sync
./wa_full_sync.py

# Or incremental sync (faster, updates only)
./wa_incremental_sync.py

Scripts

Core Sync

Script Purpose
wa_full_sync.py Full database refresh from WA API
wa_incremental_sync.py Update only changed records
nightly_wa_sync.sh Nightly sync wrapper with logging

Data Fetchers

Script Purpose
wa_fetch_contacts.sh Fetch member/contact data
wa_fetch_events.sh Fetch event listings
wa_fetch_registrations.sh Fetch event registrations
wa_fetch_invoices.sh Fetch invoice/payment data
wa_fetch_membership_levels.sh Fetch membership level definitions

Utilities

Script Purpose
wa_contacts_to_sqlite.sh Import contacts JSON to SQLite
wa_events_to_sqlite.sh Import events JSON to SQLite
wa_contacts_audit.sh Audit contact data quality
sync_all_with_quality_check.sh Sync with data validation

Database

Output is stored in data/wa.db (SQLite). Tables:

  • contacts - Member records
  • events - Event listings
  • event_registrations - Registration records
  • invoices - Invoice/payment data
  • membership_levels - Level definitions

Cron Setup

# Nightly full sync at 2 AM
0 2 * * * /path/to/wa-sync/nightly_wa_sync.sh >> /var/log/wa_sync.log 2>&1

# Or use the retry wrapper
0 2 * * * /path/to/wa-sync/run_full_sync_with_retry.sh

Environment Variables

Variable Required Description
WA_API_KEY Yes Wild Apricot API key
WA_ACCOUNT_ID No Account ID (auto-detected if not set)

Related Repos

  • wa-chatbot - Query chatbot that reads this database

About

Wild Apricot data sync to SQLite

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors