You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add bulk_add_from_file(filepath, strict=False) as file-based user import successor to deprecated create_from_file #1836
Add users.bulk_add_from_file(filepath, strict=False) -> tuple[JobItem, list[SkippedLine]] as the modern file-based user import convenience. The existing users.create_from_file is deprecated (v0.41.0) in favor of bulk_add, but bulk_add takes Iterable[UserItem] and has no file-reading equivalent. Callers who want "read this CSV, import users, tell me what happened" today have to hand-roll validation + iteration + error accumulation.
Proposed shape
defbulk_add_from_file(
self,
filepath: str,
strict: bool=False,
) ->tuple[JobItem, list[SkippedLine]]:
""" Import users from a CSV file. - Reads the file - Validates each line via UserItem.CSVImport.validate_file_for_import - If strict=True: raises ValueError on the first invalid line - If strict=False: skips invalid lines, returns them in the second tuple element - Calls POST /users/import (via bulk_add) with the valid users - Returns the JobItem plus any client-side-rejected lines """
SkippedLine would be a small dataclass carrying the raw line, line number, and validation error.
Motivation
tabcmd (createsiteusers, createusers, addusers, etc.) currently duplicates ~100 lines of CSV parsing and validation logic client-side because there's no TSC method that spans file → server. UserItem.CSVImport: several bugs prevent reliable use and block tabcmd delegation #1809 tracks bringing tabcmd onto the shared TSC implementation; this method is what tabcmd would call.
Direct TSC users get the same convenience.
strict mode gives callers the choice between fail-fast and gather-errors, matching tabcmd's existing --complete / --no-complete CLI flag.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
Activity
fix: raise on unknown AUTH in CSV import and route auth through prope…
github-actions commentedon Sep 27, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
github-actions commentedon Oct 11, 2026
Closing due to inactivity. If this is still relevant, please reopen or file a new issue.