Skip to content

parallelworks/pw-user-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Parallel Works User Report

A Python script to export users from a Parallel Works organization to CSV, with filtering for recent login activity.

Quick Start

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

Installation

uv sync

Or run directly without installing:

uv run pw_user_report.py --help

Authentication

You 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"

Usage

uv run pw_user_report.py --org ORGANIZATION [OPTIONS]

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)

Examples

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

Output

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

Environment Variables

Variable Description
PW_API_TOKEN API token (alternative to --token)
PW_BASE_URL Base URL (default: https://cloud.parallel.works)

About

Export Parallel Works organization users to CSV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages