A Python script to export users from a Parallel Works organization to CSV, with filtering for recent login activity.
# Set your API token and platform URL
export PW_API_TOKEN="your-token-here"
export PW_BASE_URL="https://activate.parallel.works" # or your platform URL
# Export users who logged in within the last 90 days
uv run pw_user_report.py --org mycompany --days 90uv syncOr run directly without installing:
uv run pw_user_report.py --helpYou need a Parallel Works API token. You can provide it via:
- Command line:
--token YOUR_TOKEN - Environment variable:
export PW_API_TOKEN="your-token-here"
uv run pw_user_report.py --org ORGANIZATION [OPTIONS]| Option | Short | Description |
|---|---|---|
--org |
-O |
Organization name (required) |
--token |
-t |
API Bearer token |
--days |
-d |
Filter to users who logged in within the last N days |
--active-only |
-a |
Only include active users |
--output |
-o |
Output CSV file (default: {org}_users.csv) |
--base-url |
-u |
Base URL (default: https://cloud.parallel.works) |
# Export users who logged in within the last 90 days
uv run pw_user_report.py --org mycompany --days 90
# Export all users (no day filter)
uv run pw_user_report.py --org mycompany
# Export only active users to a specific file
uv run pw_user_report.py --org mycompany --active-only -o active_users.csv
# Use a different Parallel Works instance
uv run pw_user_report.py --org mycompany --base-url https://myinstance.parallel.worksThe script generates a CSV file with the following columns:
| Column | Description |
|---|---|
username |
User's username |
email |
User's email address |
name |
User's display name |
active |
Whether the user account is active |
lastLogin |
ISO timestamp of last login |
daysSinceLogin |
Number of days since last login (for easy sorting) |
createdAt |
ISO timestamp of account creation |
id |
User's unique ID |
uid |
User's numeric UID |
The output is sorted by most recent login first.
| Variable | Description |
|---|---|
PW_API_TOKEN |
API token (alternative to --token) |
PW_BASE_URL |
Base URL (default: https://cloud.parallel.works) |