utils package
Submodules
utils.authentication module
Module containing a custom OAuth2 authentication class.
- class utils.authentication.GPFOAuth2Authentication[source]
Bases:
OAuth2AuthenticationProvide custom OAuth2 authentication.
This authentication class that will return a 401 error in the case that an invalid OAuth token has been provided. We need this behaviour as we have routes which will allow unauthenticated requests, which in turn prevents distinguishing requests with expired tokens from those that bear no authentication headers.
- class utils.authentication.ReadOnlyDBAuthentication[source]
Bases:
BaseAuthenticationAuthentication class intended to be used as a safeguard when we want the database to be read-only.
This is designed to be used when we want to migrate the production instance soon, and want to ensure that the database state is frozen, so that no new data can be missed during the migration.
- class utils.authentication.SessionAuthenticationWithUnauthenticatedCSRF[source]
Bases:
SessionAuthenticationSession authentication with unauthenticated CSRF.
utils.datasets module
utils.email_regex module
utils.expand_gene_set module
utils.gene_sets module
utils.logger module
- utils.logger.log_filter(request: Request | WSGIRequest, message: str, *args: Any) str[source]
Filter request info for logging.
utils.pagination module
utils.password_requirements module
utils.query_params module
utils.streaming_response_util module
utils.testing module
- utils.testing.setup_t4c8_instance(root_path: Path) GPFInstance[source]