lms.model.config
1import typing 2 3import edq.config.app 4import edq.util.crypto 5 6import lms.model.constants 7 8class Config(edq.config.app.BaseApplicationConfig): 9 """ 10 An application config for the LMS Toolkit. 11 12 This config encompasses most of what will be read on the command-line and config files. 13 This includes both more persistent options (like server, username, and password), 14 and single command options like the target course or user. 15 Config options not represented here should be available in edq.config.app.BaseApplicationConfig._extra. 16 """ 17 18 def __init__(self, 19 server: typing.Union[str, None] = None, 20 backend_type: typing.Union[lms.model.constants.BackendType, None] = None, 21 auth_user: typing.Union[str, None] = None, 22 auth_password: typing.Union[edq.util.crypto.Secret, None] = None, 23 auth_token: typing.Union[edq.util.crypto.Secret, None] = None, 24 course: typing.Union[str, None] = None, 25 assignment: typing.Union[str, None] = None, 26 quiz: typing.Union[str, None] = None, 27 user: typing.Union[str, None] = None, 28 group: typing.Union[str, None] = None, 29 groupset: typing.Union[str, None] = None, 30 output_format: typing.Union[lms.model.constants.OutputFormat, None] = None, 31 include_extra_fields: typing.Union[bool, None] = None, 32 pretty_headers: typing.Union[bool, None] = None, 33 skip_headers: typing.Union[bool, None] = None, 34 skip_rows: typing.Union[int, None] = None, 35 strict: typing.Union[bool, None] = None, 36 testing: typing.Union[bool, None] = None, 37 **kwargs: typing.Any) -> None: 38 super().__init__(**kwargs) 39 40 self.server: typing.Union[str, None] = server 41 """ The address of the LMS server to connect to. """ 42 43 self.backend_type: typing.Union[lms.model.constants.BackendType, None] = backend_type 44 """ The type of LMS being connected to (this can normally be guessed from the server address). """ 45 46 self.auth_user: typing.Union[str, None] = auth_user 47 """ The user to authenticate with. """ 48 49 self.auth_password: typing.Union[edq.util.crypto.Secret, None] = auth_password 50 """ The password to authenticate with. """ 51 52 self.auth_token: typing.Union[edq.util.crypto.Secret, None] = auth_token 53 """ The token to authenticate with. """ 54 55 self.course: typing.Union[str, None] = course 56 """ The course to target for this operation. """ 57 58 self.assignment: typing.Union[str, None] = assignment 59 """ The assignment to target for this operation. """ 60 61 self.quiz: typing.Union[str, None] = quiz 62 """ The quiz to target for this operation. """ 63 64 self.user: typing.Union[str, None] = user 65 """ The user to target for this operation. """ 66 67 self.group: typing.Union[str, None] = group 68 """ The group to target for this operation. """ 69 70 self.groupset: typing.Union[str, None] = groupset 71 """ The group set to target for this operation. """ 72 73 self.output_format: typing.Union[lms.model.constants.OutputFormat, None] = output_format 74 """ The format to display the output as. """ 75 76 self.include_extra_fields: typing.Union[bool, None] = include_extra_fields 77 """ Include non-common (usually LMS-specific) fields in results. """ 78 79 self.pretty_headers: typing.Union[bool, None] = pretty_headers 80 """ When displaying headers, try to make them look "pretty". """ 81 82 self.skip_headers: typing.Union[bool, None] = skip_headers 83 """ Skip headers when outputting results, will not apply to all formats. """ 84 85 self.skip_rows: typing.Union[int, None] = skip_rows 86 """ The number of header rows to skip. """ 87 88 self.strict: typing.Union[bool, None] = strict 89 """ Enable strict mode, which is stricter about what counts as an error. """ 90 91 self.testing: typing.Union[bool, None] = testing 92 """ If we should run as if we are in a test. """
class
Config(edq.config.app.BaseApplicationConfig):
9class Config(edq.config.app.BaseApplicationConfig): 10 """ 11 An application config for the LMS Toolkit. 12 13 This config encompasses most of what will be read on the command-line and config files. 14 This includes both more persistent options (like server, username, and password), 15 and single command options like the target course or user. 16 Config options not represented here should be available in edq.config.app.BaseApplicationConfig._extra. 17 """ 18 19 def __init__(self, 20 server: typing.Union[str, None] = None, 21 backend_type: typing.Union[lms.model.constants.BackendType, None] = None, 22 auth_user: typing.Union[str, None] = None, 23 auth_password: typing.Union[edq.util.crypto.Secret, None] = None, 24 auth_token: typing.Union[edq.util.crypto.Secret, None] = None, 25 course: typing.Union[str, None] = None, 26 assignment: typing.Union[str, None] = None, 27 quiz: typing.Union[str, None] = None, 28 user: typing.Union[str, None] = None, 29 group: typing.Union[str, None] = None, 30 groupset: typing.Union[str, None] = None, 31 output_format: typing.Union[lms.model.constants.OutputFormat, None] = None, 32 include_extra_fields: typing.Union[bool, None] = None, 33 pretty_headers: typing.Union[bool, None] = None, 34 skip_headers: typing.Union[bool, None] = None, 35 skip_rows: typing.Union[int, None] = None, 36 strict: typing.Union[bool, None] = None, 37 testing: typing.Union[bool, None] = None, 38 **kwargs: typing.Any) -> None: 39 super().__init__(**kwargs) 40 41 self.server: typing.Union[str, None] = server 42 """ The address of the LMS server to connect to. """ 43 44 self.backend_type: typing.Union[lms.model.constants.BackendType, None] = backend_type 45 """ The type of LMS being connected to (this can normally be guessed from the server address). """ 46 47 self.auth_user: typing.Union[str, None] = auth_user 48 """ The user to authenticate with. """ 49 50 self.auth_password: typing.Union[edq.util.crypto.Secret, None] = auth_password 51 """ The password to authenticate with. """ 52 53 self.auth_token: typing.Union[edq.util.crypto.Secret, None] = auth_token 54 """ The token to authenticate with. """ 55 56 self.course: typing.Union[str, None] = course 57 """ The course to target for this operation. """ 58 59 self.assignment: typing.Union[str, None] = assignment 60 """ The assignment to target for this operation. """ 61 62 self.quiz: typing.Union[str, None] = quiz 63 """ The quiz to target for this operation. """ 64 65 self.user: typing.Union[str, None] = user 66 """ The user to target for this operation. """ 67 68 self.group: typing.Union[str, None] = group 69 """ The group to target for this operation. """ 70 71 self.groupset: typing.Union[str, None] = groupset 72 """ The group set to target for this operation. """ 73 74 self.output_format: typing.Union[lms.model.constants.OutputFormat, None] = output_format 75 """ The format to display the output as. """ 76 77 self.include_extra_fields: typing.Union[bool, None] = include_extra_fields 78 """ Include non-common (usually LMS-specific) fields in results. """ 79 80 self.pretty_headers: typing.Union[bool, None] = pretty_headers 81 """ When displaying headers, try to make them look "pretty". """ 82 83 self.skip_headers: typing.Union[bool, None] = skip_headers 84 """ Skip headers when outputting results, will not apply to all formats. """ 85 86 self.skip_rows: typing.Union[int, None] = skip_rows 87 """ The number of header rows to skip. """ 88 89 self.strict: typing.Union[bool, None] = strict 90 """ Enable strict mode, which is stricter about what counts as an error. """ 91 92 self.testing: typing.Union[bool, None] = testing 93 """ If we should run as if we are in a test. """
An application config for the LMS Toolkit.
This config encompasses most of what will be read on the command-line and config files. This includes both more persistent options (like server, username, and password), and single command options like the target course or user. Config options not represented here should be available in edq.config.app.BaseApplicationConfig._extra.
Config( server: Optional[str] = None, backend_type: Optional[lms.model.constants.BackendType] = None, auth_user: Optional[str] = None, auth_password: Optional[edq.util.crypto.Secret] = None, auth_token: Optional[edq.util.crypto.Secret] = None, course: Optional[str] = None, assignment: Optional[str] = None, quiz: Optional[str] = None, user: Optional[str] = None, group: Optional[str] = None, groupset: Optional[str] = None, output_format: Optional[lms.model.constants.OutputFormat] = None, include_extra_fields: Optional[bool] = None, pretty_headers: Optional[bool] = None, skip_headers: Optional[bool] = None, skip_rows: Optional[int] = None, strict: Optional[bool] = None, testing: Optional[bool] = None, **kwargs: Any)
19 def __init__(self, 20 server: typing.Union[str, None] = None, 21 backend_type: typing.Union[lms.model.constants.BackendType, None] = None, 22 auth_user: typing.Union[str, None] = None, 23 auth_password: typing.Union[edq.util.crypto.Secret, None] = None, 24 auth_token: typing.Union[edq.util.crypto.Secret, None] = None, 25 course: typing.Union[str, None] = None, 26 assignment: typing.Union[str, None] = None, 27 quiz: typing.Union[str, None] = None, 28 user: typing.Union[str, None] = None, 29 group: typing.Union[str, None] = None, 30 groupset: typing.Union[str, None] = None, 31 output_format: typing.Union[lms.model.constants.OutputFormat, None] = None, 32 include_extra_fields: typing.Union[bool, None] = None, 33 pretty_headers: typing.Union[bool, None] = None, 34 skip_headers: typing.Union[bool, None] = None, 35 skip_rows: typing.Union[int, None] = None, 36 strict: typing.Union[bool, None] = None, 37 testing: typing.Union[bool, None] = None, 38 **kwargs: typing.Any) -> None: 39 super().__init__(**kwargs) 40 41 self.server: typing.Union[str, None] = server 42 """ The address of the LMS server to connect to. """ 43 44 self.backend_type: typing.Union[lms.model.constants.BackendType, None] = backend_type 45 """ The type of LMS being connected to (this can normally be guessed from the server address). """ 46 47 self.auth_user: typing.Union[str, None] = auth_user 48 """ The user to authenticate with. """ 49 50 self.auth_password: typing.Union[edq.util.crypto.Secret, None] = auth_password 51 """ The password to authenticate with. """ 52 53 self.auth_token: typing.Union[edq.util.crypto.Secret, None] = auth_token 54 """ The token to authenticate with. """ 55 56 self.course: typing.Union[str, None] = course 57 """ The course to target for this operation. """ 58 59 self.assignment: typing.Union[str, None] = assignment 60 """ The assignment to target for this operation. """ 61 62 self.quiz: typing.Union[str, None] = quiz 63 """ The quiz to target for this operation. """ 64 65 self.user: typing.Union[str, None] = user 66 """ The user to target for this operation. """ 67 68 self.group: typing.Union[str, None] = group 69 """ The group to target for this operation. """ 70 71 self.groupset: typing.Union[str, None] = groupset 72 """ The group set to target for this operation. """ 73 74 self.output_format: typing.Union[lms.model.constants.OutputFormat, None] = output_format 75 """ The format to display the output as. """ 76 77 self.include_extra_fields: typing.Union[bool, None] = include_extra_fields 78 """ Include non-common (usually LMS-specific) fields in results. """ 79 80 self.pretty_headers: typing.Union[bool, None] = pretty_headers 81 """ When displaying headers, try to make them look "pretty". """ 82 83 self.skip_headers: typing.Union[bool, None] = skip_headers 84 """ Skip headers when outputting results, will not apply to all formats. """ 85 86 self.skip_rows: typing.Union[int, None] = skip_rows 87 """ The number of header rows to skip. """ 88 89 self.strict: typing.Union[bool, None] = strict 90 """ Enable strict mode, which is stricter about what counts as an error. """ 91 92 self.testing: typing.Union[bool, None] = testing 93 """ If we should run as if we are in a test. """
backend_type: Optional[lms.model.constants.BackendType]
The type of LMS being connected to (this can normally be guessed from the server address).