magpie.api.management.user.user_formats

Functions

format_user(→ magpie.typedefs.JSON)

Formats a User information into JSON.

Module Contents

magpie.api.management.user.user_formats.format_user(user: magpie.models.AnyUser, group_names: List[magpie.typedefs.Str] = None, basic_info: bool = False, dotted: bool = False) magpie.typedefs.JSON[source]

Formats a User information into JSON.

Parameters:
  • userUser to be formatted.

  • group_names – Override of group name listing to provide as user memberships. Retrieve the complete group membership listing from the user if not provided.

  • basic_info – If True, return only sufficient details to identify the User, without any additional group details.

  • dotted – Employ a dot (.) instead of underscore (_) to separate User from its basic information.