pryv.explorer
¶
This packages defines the explorer.
The explorer is the web application that enables users to browse through the repository. It uses a
Flask application to handle the HTTP routing. It uses Jinja and templates located in
templates/admin
to render the served HTML. In addition, resources located in static
are used
to enhance the application. Both styles (in static/styles
) and Javascript scripts (in
static/scripts
) are used.
-
pryv.explorer.
mount
(app)¶ Mounts the explorer onto the given Flask instance.
Parameters: app ( flask.Flask
) – The Flask instance.
pryv.explorer.auth
¶
This module defines the authentication functions and routes.
-
pryv.explorer.auth.
get_login
()¶ Gets the login page.
-
pryv.explorer.auth.
get_logout
()¶ Gets the logout. This route destroys the session and logs out the user. Finally, it redirects the user to the login page.
-
pryv.explorer.auth.
mount
(app)¶ Mounts the authentication controller onto the given Flask instance.
Parameters: app ( flask.Flask
) – The Flask instance.
-
pryv.explorer.auth.
post_login
()¶ Handles the post of the login’s form. If the login is successful, redirects to the projects page after creating a session.
-
pryv.explorer.auth.
requires_auth
(func)¶ Decorates the given function as requiring the user to be authenticated. If the user is authenticated, this decorator passes the call through; however, if the user is not authenticated, this decorator redirects the user to the login page.
Parameters: func ( function
) – The function (route) to decorate.Returns: A decorated function. Return type: function
pryv.explorer.project
¶
This module defines the routes to view the projects and their details.
-
pryv.explorer.project.
get_project
(project_normalized_name, release_name)¶ Gets the project’s page for the given release name. This route is a shortcut to the page with detailed information on a project with the description tab open.
Parameters: - project_normalized_name (
str
) – The project’s normalized name. - release_name (
str
) – The name of the release to view.
- project_normalized_name (
-
pryv.explorer.project.
get_project_default
(project_normalized_name)¶ Gets the default project’s page. This route is a shortcut to the page with detailed information on a project. It sets the release name to
latest
.Parameters: project_normalized_name ( str
) – The project’s normalized name.
-
pryv.explorer.project.
get_project_tab
(*_args, **_kwargs)¶ Gets the project’s page for the given release name, with the tab with the given name open.
Parameters: - project_normalized_name (
str
) – The project’s normalized name. - release_name (
str
) – The name of the release to view. - tab_name (
str
) – The name of the tab.
- project_normalized_name (
-
pryv.explorer.project.
get_projects
(*_args, **_kwargs)¶ Gets the main projects page.
-
pryv.explorer.project.
mount
(app)¶ Mounts the project controller onto the given Flask instance.
Parameters: app ( flask.Flask
) – The Flask instance.
-
pryv.explorer.project.
post_projects
(*_args, **_kwargs)¶ Posts a search to the projects page. This route is used to handle use of the project’s search bar from another page than the main projects page.
pryv.explorer.setup
¶
This module defines the routes to view the setup at the user’s first visit.
-
pryv.explorer.setup.
get_setup
()¶ Gets the setup page.
-
pryv.explorer.setup.
mount
(app)¶ Mounts the setup controller onto the given Flask instance.
Parameters: app ( flask.Flask
) – The Flask instance.
-
pryv.explorer.setup.
post_setup
()¶ Handles for submission from the setup page.