users_api.management.commands package

Submodules

users_api.management.commands.dataset_groups module

class users_api.management.commands.dataset_groups.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand, DatasetBaseMixin

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Check an existing dataset access groups'

users_api.management.commands.dataset_mixin module

class users_api.management.commands.dataset_mixin.DatasetBaseMixin(gpf_instance=None)[source]

Bases: DatasetHelpers

Mixin for dataset management.

get_dataset(dataset_id: str) Dataset | None[source]

Get dataset by id.

remove_wdae_dataset_and_groups(dataset_id: str, dry_run: bool = False) None[source]

Remove WDAE dataset and groups.

rename_wdae_dataset_and_groups(dataset_id: str, new_id: str, dry_run: bool = False) None[source]

Rename WDAE dataset and groups.

users_api.management.commands.datasets_export module

class users_api.management.commands.datasets_export.Command(**kwargs)[source]

Bases: BaseCommand, DatasetBaseMixin

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Export all existing datasets'

users_api.management.commands.datasets_restore module

class users_api.management.commands.datasets_restore.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

handle_dataset(dataset)[source]
help = 'Add rights to datasets from an input CSV file'

users_api.management.commands.datasets_show module

class users_api.management.commands.datasets_show.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Show all existing datasets'

users_api.management.commands.export_base module

class users_api.management.commands.export_base.ExportUsersBase[source]

Bases: object

get_visible_groups(user)[source]

users_api.management.commands.groups_cleanup module

class users_api.management.commands.groups_cleanup.Command(**kwargs)[source]

Bases: BaseCommand, DatasetBaseMixin

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

cleanup_groups(dry_run)[source]
cleanup_users(dry_run)[source]
cleanup_wdae_datasets(dry_run)[source]
handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'clean up groups that are not in use'

users_api.management.commands.import_base module

class users_api.management.commands.import_base.ImportUsersBase[source]

Bases: object

Helper for users import.

handle_user(res: dict[str, str]) WdaeUser[source]

Handle creation of user on import.

users_api.management.commands.unlock_user module

class users_api.management.commands.unlock_user.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: ImportUsersBase, BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = "Remove a lockout on a user's account."

users_api.management.commands.user_create module

class users_api.management.commands.user_create.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand, ImportUsersBase

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Create new user'

users_api.management.commands.user_set_name module

class users_api.management.commands.user_set_name.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Change the name of the user with the given email'

users_api.management.commands.user_setpasswd module

class users_api.management.commands.user_setpasswd.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Change the password of a user with the given email'

users_api.management.commands.users_add module

class users_api.management.commands.users_add.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: ImportUsersBase, BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Add users from csv. Required column names for the csv file - Email.Optional column names - Groups, Name, Password'

users_api.management.commands.users_export module

class users_api.management.commands.users_export.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand, ExportUsersBase

Export users command.

add_arguments(parser: CommandParser) None[source]

Entry point for subclassed commands to add custom arguments.

handle(*args: Any, **options: Any) None[source]

The actual logic of the command. Subclasses must implement this method.

handle_user(user: WdaeUser, writer: DictWriter) None[source]

Handle user export.

help = 'Export all users to stdout/csv file.'

users_api.management.commands.users_group_add module

class users_api.management.commands.users_group_add.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Add user into group(s)'

users_api.management.commands.users_group_remove module

class users_api.management.commands.users_group_remove.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Remove user from group(s)'

users_api.management.commands.users_remove module

class users_api.management.commands.users_remove.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Delete user'

users_api.management.commands.users_restore module

class users_api.management.commands.users_restore.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: ImportUsersBase, BaseCommand

Restore users command.

add_arguments(parser: CommandParser) None[source]

Entry point for subclassed commands to add custom arguments.

handle(*args: Any, **options: Any) None[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Delete all users and adds new ones from csv. Required column names for the csv file - Email. Optional column names - Groups, Name, Password'

users_api.management.commands.users_show module

class users_api.management.commands.users_show.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]

Bases: BaseCommand, ExportUsersBase

add_arguments(parser)[source]

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)[source]

The actual logic of the command. Subclasses must implement this method.

help = 'Show all information about user'

Module contents