diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-07 13:59:08 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-07 13:59:08 +0530 |
commit | 3a708b304319afe84ebf3d40ecebabe6acc339f3 (patch) | |
tree | b72f391dbe4d5370394c546f94e10d6edaa17a63 /docs/_build/html/_sources | |
parent | 359813517e3382c527125fe673fa89f0fd0742c0 (diff) |
started work on automatic documentation
Diffstat (limited to 'docs/_build/html/_sources')
23 files changed, 1097 insertions, 0 deletions
diff --git a/docs/_build/html/_sources/autoapi/app/apis/index.rst.txt b/docs/_build/html/_sources/autoapi/app/apis/index.rst.txt new file mode 100644 index 0000000..535fb23 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/apis/index.rst.txt @@ -0,0 +1,28 @@ +:mod:`app.apis` +=============== + +.. py:module:: app.apis + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.apis.API_Version + app.apis.API_User_Details + + + +.. function:: API_Version() + :async: + + +.. function:: API_User_Details(email: str) + :async: + + diff --git a/docs/_build/html/_sources/autoapi/app/config/index.rst.txt b/docs/_build/html/_sources/autoapi/app/config/index.rst.txt new file mode 100644 index 0000000..57fb9e0 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/config/index.rst.txt @@ -0,0 +1,79 @@ +:mod:`app.config` +================= + +.. py:module:: app.config + + +Module Contents +--------------- + +.. data:: SQLALCHEMY_DATABASE_URI + :annotation: = sqlite:////tmp/test.db + + + +.. data:: SQLALCHEMY_TRACK_MODIFICATIONS + :annotation: = False + + + +.. data:: SECRET_KEY + :annotation: = tchtchtch + + + +.. data:: ADMIN_EMAIL + :annotation: = admin@example.com + + + +.. data:: ADMIN_PASSWORD + :annotation: = iamgroot + + + +.. data:: GOOGLE_CLIENT_ID + + + + +.. data:: GOOGLE_CLIENT_SECRET + + + + +.. data:: MAIL_BACKEND + :annotation: = smtp + + + +.. data:: MAIL_SERVER + + + + +.. data:: MAIL_PORT + + + + +.. data:: MAIL_USERNAME + + + + +.. data:: MAIL_PASSWORD + + + + +.. data:: MAIL_FROM + + + + +.. data:: MAIL_USE_TLS + + + + diff --git a/docs/_build/html/_sources/autoapi/app/config_dev/index.rst.txt b/docs/_build/html/_sources/autoapi/app/config_dev/index.rst.txt new file mode 100644 index 0000000..8a17671 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/config_dev/index.rst.txt @@ -0,0 +1,79 @@ +:mod:`app.config_dev` +===================== + +.. py:module:: app.config_dev + + +Module Contents +--------------- + +.. data:: SQLALCHEMY_DATABASE_URI + :annotation: = sqlite:////tmp/test.db + + + +.. data:: SQLALCHEMY_TRACK_MODIFICATIONS + :annotation: = False + + + +.. data:: SECRET_KEY + :annotation: = tchtchtch + + + +.. data:: ADMIN_EMAIL + :annotation: = admin@example.com + + + +.. data:: ADMIN_PASSWORD + :annotation: = iamgroot + + + +.. data:: GOOGLE_CLIENT_ID + + + + +.. data:: GOOGLE_CLIENT_SECRET + + + + +.. data:: MAIL_BACKEND + :annotation: = smtp + + + +.. data:: MAIL_SERVER + + + + +.. data:: MAIL_PORT + + + + +.. data:: MAIL_USERNAME + + + + +.. data:: MAIL_PASSWORD + + + + +.. data:: MAIL_FROM + + + + +.. data:: MAIL_USE_TLS + + + + diff --git a/docs/_build/html/_sources/autoapi/app/forms/app_forms/index.rst.txt b/docs/_build/html/_sources/autoapi/app/forms/app_forms/index.rst.txt new file mode 100644 index 0000000..5afa9c2 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/forms/app_forms/index.rst.txt @@ -0,0 +1,107 @@ +:mod:`app.forms.app_forms` +========================== + +.. py:module:: app.forms.app_forms + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + app.forms.app_forms.MyForm + app.forms.app_forms.UserSignUp + app.forms.app_forms.UserLogIn + + + + +.. class:: MyForm(formdata=_Auto, **kwargs) + + + Bases: :py:obj:`flask_wtf.FlaskForm` + + Flask-specific subclass of WTForms :class:`~wtforms.form.Form`. + + If ``formdata`` is not specified, this will use :attr:`flask.request.form` + and :attr:`flask.request.files`. Explicitly pass ``formdata=None`` to + prevent this. + + .. attribute:: name + + + + + .. attribute:: email + + + + + .. attribute:: subject + + + + + .. attribute:: body + + + + + +.. class:: UserSignUp(formdata=_Auto, **kwargs) + + + Bases: :py:obj:`flask_wtf.FlaskForm` + + Flask-specific subclass of WTForms :class:`~wtforms.form.Form`. + + If ``formdata`` is not specified, this will use :attr:`flask.request.form` + and :attr:`flask.request.files`. Explicitly pass ``formdata=None`` to + prevent this. + + .. attribute:: first_name + + + + + .. attribute:: last_name + + + + + .. attribute:: email + + + + + .. attribute:: password + + + + + +.. class:: UserLogIn(formdata=_Auto, **kwargs) + + + Bases: :py:obj:`flask_wtf.FlaskForm` + + Flask-specific subclass of WTForms :class:`~wtforms.form.Form`. + + If ``formdata`` is not specified, this will use :attr:`flask.request.form` + and :attr:`flask.request.files`. Explicitly pass ``formdata=None`` to + prevent this. + + .. attribute:: email + + + + + .. attribute:: password + + + + + diff --git a/docs/_build/html/_sources/autoapi/app/forms/index.rst.txt b/docs/_build/html/_sources/autoapi/app/forms/index.rst.txt new file mode 100644 index 0000000..e130485 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/forms/index.rst.txt @@ -0,0 +1,15 @@ +:mod:`app.forms` +================ + +.. py:module:: app.forms + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + app_forms/index.rst + + diff --git a/docs/_build/html/_sources/autoapi/app/index.rst.txt b/docs/_build/html/_sources/autoapi/app/index.rst.txt new file mode 100644 index 0000000..d3918b8 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/index.rst.txt @@ -0,0 +1,107 @@ +:mod:`app` +========== + +.. py:module:: app + + +Subpackages +----------- +.. toctree:: + :titlesonly: + :maxdepth: 3 + + forms/index.rst + tests/index.rst + views/index.rst + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + apis/index.rst + config/index.rst + config_dev/index.rst + misc_func/index.rst + models/index.rst + + +Package Contents +---------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.create_database + app.delete_database + app.make_superuser_database + app.load_user + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + app.app + app.bcrypt + app.db + app.login_manager + app.oauth + app.mail + app.database_cli + + +.. data:: app + + + + +.. data:: bcrypt + + + + +.. data:: db + + + + +.. data:: login_manager + + + + +.. data:: oauth + + + + +.. data:: mail + + + + +.. data:: database_cli + + + + +.. function:: create_database() + + +.. function:: delete_database() + + +.. function:: make_superuser_database() + + +.. function:: load_user(email) + + diff --git a/docs/_build/html/_sources/autoapi/app/misc_func/index.rst.txt b/docs/_build/html/_sources/autoapi/app/misc_func/index.rst.txt new file mode 100644 index 0000000..5623df1 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/misc_func/index.rst.txt @@ -0,0 +1,30 @@ +:mod:`app.misc_func` +==================== + +.. py:module:: app.misc_func + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.misc_func.flash_errors + app.misc_func.send + app.misc_func.send_async + + + +.. function:: flash_errors(form) + + +.. function:: send(to, subject, body, body_html) + + +.. function:: send_async(app, message) + + diff --git a/docs/_build/html/_sources/autoapi/app/models/index.rst.txt b/docs/_build/html/_sources/autoapi/app/models/index.rst.txt new file mode 100644 index 0000000..f425142 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/models/index.rst.txt @@ -0,0 +1,99 @@ +:mod:`app.models` +================= + +.. py:module:: app.models + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + app.models.User + + + + +.. class:: User + + Bases: :py:obj:`app.db.Model`, :py:obj:`flask_login.UserMixin` + + This provides default implementations for the methods that Flask-Login + expects user objects to have. + + .. attribute:: __tablename__ + :annotation: = users + + + + .. attribute:: first_name + + + + + .. attribute:: last_name + + + + + .. attribute:: email + + + + + .. attribute:: confirmation + + + + + .. attribute:: paid + + + + + .. attribute:: role + + + + + .. attribute:: team + + + + + .. attribute:: login_type + + + + + .. attribute:: _password + + + + + .. method:: full_name(self) + :property: + + + .. method:: password(self) + + + .. method:: check_password(self, plaintext) + + + .. method:: get_id(self) + + + .. method:: get_role(self) + + + .. method:: get_team(self) + + + .. method:: is_paid(self) + + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/conftest/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/conftest/index.rst.txt new file mode 100644 index 0000000..9be1b50 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/conftest/index.rst.txt @@ -0,0 +1,35 @@ +:mod:`app.tests.conftest` +========================= + +.. py:module:: app.tests.conftest + +.. autoapi-nested-parse:: + + Configuration with basic fixtures + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.tests.conftest.app + app.tests.conftest.client + + + +.. function:: app() + + Special configurations for tests + + We use a dummy database and initialise it. + + +.. function:: client(app) + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/index.rst.txt new file mode 100644 index 0000000..201c641 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/index.rst.txt @@ -0,0 +1,26 @@ +:mod:`app.tests` +================ + +.. py:module:: app.tests + +.. autoapi-nested-parse:: + + PyTest Modules for Unit Testing + + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + conftest/index.rst + test_admin/index.rst + test_cli/index.rst + test_fastapi/index.rst + test_forms/index.rst + test_models/index.rst + test_views/index.rst + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/test_admin/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/test_admin/index.rst.txt new file mode 100644 index 0000000..45e0a95 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/test_admin/index.rst.txt @@ -0,0 +1,32 @@ +:mod:`app.tests.test_admin` +=========================== + +.. py:module:: app.tests.test_admin + +.. autoapi-nested-parse:: + + Test(s) for Admin Portal + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_admin.test_admin + + + +.. function:: test_admin(app, client) + + Test Admin Portal + + We use the cli-runner to run the admin-create command. + Then we check if the admin portal is accessible to the newly created superuser. + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/test_cli/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/test_cli/index.rst.txt new file mode 100644 index 0000000..8e1241c --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/test_cli/index.rst.txt @@ -0,0 +1,31 @@ +:mod:`app.tests.test_cli` +========================= + +.. py:module:: app.tests.test_cli + +.. autoapi-nested-parse:: + + Test(s) for CLI Commands + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_cli.test_database_commands + + + +.. function:: test_database_commands(app, client) + + Test for Database CLI Commands + + Test for initialisation, creation and admin user creation. + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/test_fastapi/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/test_fastapi/index.rst.txt new file mode 100644 index 0000000..ba608e5 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/test_fastapi/index.rst.txt @@ -0,0 +1,52 @@ +:mod:`app.tests.test_fastapi` +============================= + +.. py:module:: app.tests.test_fastapi + +.. autoapi-nested-parse:: + + Test(s) for FastAPI Inegration + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_fastapi.test_fastapi + app.tests.test_fastapi.test_fastapi_user_details + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_fastapi.fastapi_client + + +.. data:: fastapi_client + + + + +.. function:: test_fastapi(app, client) + + Basic Version Test + + Check if endpoint is accessible + + +.. function:: test_fastapi_user_details(app, client) + + Basic User Test + + Check if DB is accessible to the FastAPI App + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/test_forms/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/test_forms/index.rst.txt new file mode 100644 index 0000000..d49eab1 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/test_forms/index.rst.txt @@ -0,0 +1,37 @@ +:mod:`app.tests.test_forms` +=========================== + +.. py:module:: app.tests.test_forms + +.. autoapi-nested-parse:: + + Test(s) for Forms + + Tests the forms and their validations + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_forms.test_incorrect_forms + app.tests.test_forms.test_contactus + + + +.. function:: test_incorrect_forms(app, client) + + Simulate Invalid Forms + + +.. function:: test_contactus(app, client) + + Test Valid Form Submission + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/test_models/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/test_models/index.rst.txt new file mode 100644 index 0000000..23db7d4 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/test_models/index.rst.txt @@ -0,0 +1,29 @@ +:mod:`app.tests.test_models` +============================ + +.. py:module:: app.tests.test_models + +.. autoapi-nested-parse:: + + Test(s) for Database Models + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_models.test_usermodel + + + +.. function:: test_usermodel(app, client) + + Test User Model + + diff --git a/docs/_build/html/_sources/autoapi/app/tests/test_views/index.rst.txt b/docs/_build/html/_sources/autoapi/app/tests/test_views/index.rst.txt new file mode 100644 index 0000000..ebcb77a --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/tests/test_views/index.rst.txt @@ -0,0 +1,58 @@ +:mod:`app.tests.test_views` +=========================== + +.. py:module:: app.tests.test_views + +.. autoapi-nested-parse:: + + Test(s) for Flask Views + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_views.test_visitors + app.tests.test_views.test_user_auth_flow + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + app.tests.test_views.ts + app.tests.test_views.data2check_visitors + + +.. data:: ts + + + To create confirmation tokens + + +.. data:: data2check_visitors + + + Dictionary of Path, Expected Status Code and Data to Test for Visitors + + +.. function:: test_visitors(app, client) + + Test if Vistors get expected endpoints and status codes + + +.. function:: test_user_auth_flow(app, client) + + Test User Authentication Flow + + Tests Registeration, Email-Confirmation and Log-in along with appropriate redirects. + + diff --git a/docs/_build/html/_sources/autoapi/app/views/admin/index.rst.txt b/docs/_build/html/_sources/autoapi/app/views/admin/index.rst.txt new file mode 100644 index 0000000..f9ea549 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/views/admin/index.rst.txt @@ -0,0 +1,55 @@ +:mod:`app.views.admin` +====================== + +.. py:module:: app.views.admin + +.. autoapi-nested-parse:: + + SuperUser/Admin portal using flask-admin + + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + app.views.admin.ModelView + + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + app.views.admin.admin + + +.. data:: admin + + + Initialised Admin Portal + + +.. class:: ModelView(model, session, name=None, category=None, endpoint=None, url=None, static_folder=None, menu_class_name=None, menu_icon_type=None, menu_icon_value=None) + + + Bases: :py:obj:`flask_admin.contrib.sqla.ModelView` + + Our extended ModelView Class + + Refer to Flask-Admin Docs for more details + + https://flask-admin.readthedocs.io/en/latest/introduction/?highlight=ModelView#modelview-configuration-attributes + + .. method:: is_accessible(self) + + This function checks if a user should be given access or not + + + diff --git a/docs/_build/html/_sources/autoapi/app/views/auth/index.rst.txt b/docs/_build/html/_sources/autoapi/app/views/auth/index.rst.txt new file mode 100644 index 0000000..5dcf9d7 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/views/auth/index.rst.txt @@ -0,0 +1,63 @@ +:mod:`app.views.auth` +===================== + +.. py:module:: app.views.auth + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.views.auth.register_user + app.views.auth.signin_user + app.views.auth.login_with_google + app.views.auth.login_with_google_auth + app.views.auth.confirm_email + app.views.auth.user_dashboard + app.views.auth.logout + app.views.auth.unauthorized + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + app.views.auth.ts + + +.. data:: ts + + + + +.. function:: register_user() + + +.. function:: signin_user() + + +.. function:: login_with_google() + + +.. function:: login_with_google_auth() + + +.. function:: confirm_email() + + +.. function:: user_dashboard() + + +.. function:: logout() + + +.. function:: unauthorized() + + diff --git a/docs/_build/html/_sources/autoapi/app/views/error_pages/index.rst.txt b/docs/_build/html/_sources/autoapi/app/views/error_pages/index.rst.txt new file mode 100644 index 0000000..b0f7d91 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/views/error_pages/index.rst.txt @@ -0,0 +1,47 @@ +:mod:`app.views.error_pages` +============================ + +.. py:module:: app.views.error_pages + +.. autoapi-nested-parse:: + + This file describes the errors and the message the user should see. + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.views.error_pages.simulate_500 + app.views.error_pages.page_forbidden + app.views.error_pages.page_not_found + app.views.error_pages.page_server_error + + + +.. function:: simulate_500() + + Used to simulate a error 500 for test coverage of 500 handling + + +.. function:: page_forbidden(e) + + Thrown when a user accesses a page with @flask_login.login_required + + +.. function:: page_not_found(e) + + Page for resource or file nout found + + +.. function:: page_server_error(e) + + Page for internal server error + + diff --git a/docs/_build/html/_sources/autoapi/app/views/index.rst.txt b/docs/_build/html/_sources/autoapi/app/views/index.rst.txt new file mode 100644 index 0000000..499df52 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/views/index.rst.txt @@ -0,0 +1,18 @@ +:mod:`app.views` +================ + +.. py:module:: app.views + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + admin/index.rst + auth/index.rst + error_pages/index.rst + main/index.rst + + diff --git a/docs/_build/html/_sources/autoapi/app/views/main/index.rst.txt b/docs/_build/html/_sources/autoapi/app/views/main/index.rst.txt new file mode 100644 index 0000000..e7c4e7c --- /dev/null +++ b/docs/_build/html/_sources/autoapi/app/views/main/index.rst.txt @@ -0,0 +1,39 @@ +:mod:`app.views.main` +===================== + +.. py:module:: app.views.main + +.. autoapi-nested-parse:: + + This is the main views module. + + You should import all other views into this file rather than individually importing in __init__.py + + + +Module Contents +--------------- + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + app.views.main.index + app.views.main.contact_us + + + +.. function:: index() + + The view for the landing page. + + +.. function:: contact_us() + + A simple contact us form with basic validation. + + This dummy form has not been linked to any database. + + diff --git a/docs/_build/html/_sources/autoapi/index.rst.txt b/docs/_build/html/_sources/autoapi/index.rst.txt new file mode 100644 index 0000000..40a1680 --- /dev/null +++ b/docs/_build/html/_sources/autoapi/index.rst.txt @@ -0,0 +1,11 @@ +API Reference +============= + +This page contains auto-generated API reference documentation [#f1]_. + +.. toctree:: + :titlesonly: + + /autoapi/app/index + +.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_
\ No newline at end of file diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/html/_sources/index.rst.txt new file mode 100644 index 0000000..72baea5 --- /dev/null +++ b/docs/_build/html/_sources/index.rst.txt @@ -0,0 +1,20 @@ +.. SaaS in a Flask documentation master file, created by + sphinx-quickstart on Mon Jun 7 13:53:39 2021. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to SaaS in a Flask's documentation! +=========================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` |