Index A | B | C | D | F | G | H | I | J | K | L | M | N | O | P | R | S | T | U | W A add_new_chat() (in module utils.functions.utility_functions) api module api.endpoints module api.endpoints.endpoints module ApplicationBackendStartupAndShutdownFunctionsTest (class in tests.api.test_endpoints) ApplicationBackendStartupAndShutdownTest (class in tests.api.test_endpoints) ApplicationControllerTestCase (class in tests.controller.test_controller) B BaseTestDatabaseTestCase (class in tests.database.base) C Chat (class in models.chat) chat_context (json_defs.requests.json_request_body_defs.SetUpChatRequestBody attribute) (models.chat.Chat attribute) chat_number_of_users (json_defs.requests.json_request_body_defs.SetUpChatRequestBody attribute) chat_title (json_defs.requests.json_request_body_defs.SetUpChatRequestBody attribute) (models.chat.Chat attribute) ChatModelTestCase (class in tests.models.test_models) close_apache_kafka_producer() (in module api.endpoints.endpoints) connect_ws() (controller.controller_def.Controller method) consumers (controller.kafka_manager_def.KafkaManager property) content (json_defs.message.message.MessageJSON attribute) context_id (json_defs.message.message.MessageJSON attribute) controller module Controller (class in controller.controller_def) controller.controller_def module controller.kafka_manager_def module create_apache_kafka_topic() (in module utils.functions.utility_functions) create_base_kafka_manager() (controller.kafka_manager_def.KafkaManagerFactory static method) create_message_JSON() (in module utils.functions.utility_functions) D database module database.database module F from_role_options() (user.user_def.User class method) G generate_message() (user.user_def.User class method) generate_message_from_user() (in module utils.functions.utility_functions) get_db() (in module database.database) H handle_chat() (in module api.endpoints.endpoints) I InelegantKafkaShutdownWarning init_db() (in module database.database) initialise() (controller.controller_def.Controller static method) J json_defs module json_defs.message module json_defs.message.message module json_defs.requests module json_defs.requests.json_request_body_defs module K KafkaManager (class in controller.kafka_manager_def) KafkaManagerFactory (class in controller.kafka_manager_def) KafkaTopicAlreadyExists L lifespan() (in module api.endpoints.endpoints) M MessageJSON (class in json_defs.message.message) model_computed_fields (json_defs.message.message.MessageJSON attribute) (json_defs.requests.json_request_body_defs.SetUpChatRequestBody attribute) model_config (json_defs.message.message.MessageJSON attribute) (json_defs.requests.json_request_body_defs.SetUpChatRequestBody attribute) model_fields (json_defs.message.message.MessageJSON attribute) (json_defs.requests.json_request_body_defs.SetUpChatRequestBody attribute) models module models.chat module module api api.endpoints api.endpoints.endpoints controller controller.controller_def controller.kafka_manager_def database database.database json_defs json_defs.message json_defs.message.message json_defs.requests json_defs.requests.json_request_body_defs models models.chat role role.role tests tests.api tests.api.test_endpoints tests.controller tests.controller.test_controller tests.controller.test_kafka_manager tests.database tests.database.base tests.database.test_database tests.json_defs tests.json_defs.messages tests.json_defs.messages.test_message tests.json_defs.requests tests.json_defs.requests.test_json_request_body_defs tests.models tests.models.test_models tests.roles tests.roles.test_roles tests.users tests.users.test_users tests.utils tests.utils.exceptions tests.utils.exceptions.test_exceptions tests.utils.functions tests.utils.functions.test_functions user user.user_def utils utils.exceptions utils.exceptions.custom_exceptions utils.functions utils.functions.utility_functions MultipleKafkaProducerStartWarning N NOT_SET (role.role.Roles attribute) O OperationNotAllowedException P parent_message_id (json_defs.message.message.MessageJSON attribute) partition_hint (json_defs.message.message.MessageJSON attribute) producers (controller.kafka_manager_def.KafkaManager property) PUBLISHER (role.role.Roles attribute) R randomly_generated_kafka_test_topic (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic property) role module role (user.user_def.User property) role.role module Roles (class in role.role) S set_random_role() (user.user_def.User method) set_up_chat() (in module api.endpoints.endpoints) setUp() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownTest method) (tests.database.base.BaseTestDatabaseTestCase method) (tests.roles.test_roles.TestRolesTestCase method) (tests.users.test_users.TestUserTestCase method) SetUpChatEndpointTestCase (class in tests.api.test_endpoints) SetUpChatRequestBody (class in json_defs.requests.json_request_body_defs) setUpClass() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest class method) (tests.api.test_endpoints.SetUpChatEndpointTestCase class method) (tests.api.test_endpoints.WebSocketTestCase class method) (tests.controller.test_controller.ApplicationControllerTestCase class method) (tests.database.base.BaseTestDatabaseTestCase class method) (tests.roles.test_roles.TestRolesTestCase class method) (tests.users.test_users.TestUserTestCase class method) (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic class method) (tests.utils.functions.test_functions.TestGenerateMessage class method) setUpModule() (in module tests.controller.test_controller) start_apache_kafka_producer() (in module api.endpoints.endpoints) SUBSCRIBER (role.role.Roles attribute) T tearDown() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) (tests.users.test_users.TestUserTestCase method) (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic method) tearDownClass() (tests.database.base.BaseTestDatabaseTestCase class method) tearDownModule() (in module tests.controller.test_controller) teatDown() (tests.roles.test_roles.TestRolesTestCase method) test_close_apache_kafka_producer_calls_close_on_the_server_AIOKafkaProducer_object() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) test_close_apache_kafka_producer_triggers_warning_when_supplied_fastapi_application_instance_has_no_kafka_producer_state_attribute() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) test_close_method_of_kafka_manager_class_stops_all_producers_and_producers() (tests.controller.test_kafka_manager.TestKafkaManager method) test_controller_connects_to_chat_websocket_on_init() (tests.controller.test_controller.ApplicationControllerTestCase method) test_controller_constructor_has_array_of_unique_users_based_on_constructor_argument() (tests.controller.test_controller.ApplicationControllerTestCase method) test_controller_fails_to_connect_to_chat_websocket_on_invalid_url() (tests.controller.test_controller.ApplicationControllerTestCase method) test_controller_has_null_websocket_attribute_which_becomes_populated_on_connection() (tests.controller.test_controller.ApplicationControllerTestCase method) test_controller_has_string_chat_context_attribute_gotten_from_constructor() (tests.controller.test_controller.ApplicationControllerTestCase method) test_controller_has_web_socket_url_attribute_gotten_from_constructor() (tests.controller.test_controller.ApplicationControllerTestCase method) test_controller_method_for_connecting_to_websocket_can_send_messages_to_websocket() (tests.controller.test_controller.ApplicationControllerTestCase method) test_controller_on_init_initialises_base_kafka_manager_with_correct_arguments() (tests.controller.test_controller.ApplicationControllerTestCase method) test_endpoint_creates_kafka_topic_for_the_chat_before_returning_response_on_successful_function_call() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_creates_new_application_controller_for_chat_session() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_creates_new_chat_uuid_in_database_chats_table() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_does_not_create_new_application_controller_if_there_is_a_failure_to_create_kafka_topic() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_only_takes_post_requests() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_redirect_url_matches_that_of_the_expected_chat_url() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_returns_redirect_response_pointing_to_the_url_for_the_chat() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_returns_server_error_on_exception_from_function_to_create_kafka_topic() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_endpoint_takes_request_json_body_of_expected_type() (tests.api.test_endpoints.SetUpChatEndpointTestCase method) test_exception_is_raised_with_default_message() (tests.utils.exceptions.test_exceptions.TestOperationNotAllowedException method) test_exception_is_raised_with_set_custom_message() (tests.utils.exceptions.test_exceptions.TestOperationNotAllowedException method) test_function_adds_new_chat_record_to_database() (tests.utils.functions.test_functions.TestAddChat method) test_function_calls_User_generate_message_method_once_during_function_call() (tests.utils.functions.test_functions.TestGenerateMessage method) test_function_creates_kafka_topic() (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic method) test_function_displays_warning_in_the_event_topic_to_be_created_already_exists() (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic method) test_function_raises_exception_if_kafka_topic_was_not_created_successfully() (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic method) test_function_raises_exception_when_chat_context_is_an_empty_string() (tests.utils.functions.test_functions.TestAddChat method) test_function_raises_exception_when_chat_title_is_an_empty_string() (tests.utils.functions.test_functions.TestAddChat method) test_function_raises_value_error_on_invalid_inputs() (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic method) test_function_return_type_is_of_expected_json_type() (tests.utils.functions.test_functions.TestGenerateMessage method) test_function_returns_json_object_when_called_with_required_arguments() (tests.utils.functions.test_functions.TestCreateMessageJSON method) test_function_returns_message_json_with_different_context_id_from_passed_context_id_if_parent_id_is_None() (tests.utils.functions.test_functions.TestGenerateMessage method) test_function_returns_message_json_with_same_context_id_from_passed_context_id_if_parent_id_is_not_None() (tests.utils.functions.test_functions.TestGenerateMessage method) test_function_takes_other_other_arguments_including_instantiated_user_object_to_populate_return_value() (tests.utils.functions.test_functions.TestGenerateMessage method) test_function_takes_session_argument() (tests.utils.functions.test_functions.TestAddChat method) test_function_takes_topic_argument() (tests.utils.functions.test_functions.TestCreateApacheKafkaTopic method) test_function_takes_User_object_argument_where_the_passed_object_must_already_be_instantiated() (tests.utils.functions.test_functions.TestGenerateMessage method) test_get_db_returns_session_object() (tests.database.test_database.TestGetDB method) test_get_db_returns_session_object_without_any_missing_tables() (tests.database.test_database.TestGetDB method) test_initialised_controller_has_kafka_manager_attribute() (tests.controller.test_controller.ApplicationControllerTestCase method) test_instantiated_kafka_manager_class_consumers_property_is_immutable() (tests.controller.test_kafka_manager.TestKafkaManager method) test_instantiated_kafka_manager_class_consumers_property_returns_a_tuple_of_AIOKafkaConsumers_objects() (tests.controller.test_kafka_manager.TestKafkaManager method) test_instantiated_kafka_manager_class_has_consumers_property() (tests.controller.test_kafka_manager.TestKafkaManager method) test_instantiated_kafka_manager_class_has_producers_property() (tests.controller.test_kafka_manager.TestKafkaManager method) test_instantiated_kafka_manager_class_producers_property_is_immutable() (tests.controller.test_kafka_manager.TestKafkaManager method) test_instantiated_kafka_manager_class_producers_property_returns_a_tuple_of_AIOKafkaProducers_objects() (tests.controller.test_kafka_manager.TestKafkaManager method) test_json_has_expected_fields() (tests.json_defs.requests.test_json_request_body_defs.TestSetUpChatRequestJsonProperties method) test_json_has_fields_of_expected_type() (tests.json_defs.requests.test_json_request_body_defs.TestSetUpChatRequestJsonProperties method) test_kafka_manager_class_exists() (tests.controller.test_kafka_manager.TestKafkaManager method) test_kafka_manager_factory_class_exists() (tests.controller.test_kafka_manager.TestKafkaManagerFactory method) test_kafka_manager_factory_method_for_creating_base_kafka_manager_takes_a_non_zero_input_for_number_of_users() (tests.controller.test_kafka_manager.TestKafkaManagerFactory method) test_kafka_manager_factory_method_for_creating_base_kafka_manager_works() (tests.controller.test_kafka_manager.TestKafkaManagerFactory method) test_kafka_producer_for_chat_end_point_starts_at_startup() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownTest method) test_message_json_schema() (tests.json_defs.messages.test_message.TestMessagesJSON method) test_model_has_chat_uuid_column() (tests.models.test_models.ChatModelTestCase method) test_model_inherits_from_sqlalchemy_base() (tests.models.test_models.ChatModelTestCase method) test_model_is_a_class_model() (tests.models.test_models.ChatModelTestCase method) test_on_closure_of_kafka_manager_class_close_method_is_called() (tests.controller.test_kafka_manager.TestKafkaManager method) test_on_instantiation_of_kafka_manager_class_all_producer_and_consumer_instances_are_started() (tests.controller.test_kafka_manager.TestKafkaManager method) test_role_enum_class_exists() (tests.roles.test_roles.TestRolesTestCase method) test_role_enum_has_both_publisher_and_subscriber_representation_entities() (tests.roles.test_roles.TestRolesTestCase method) test_role_enum_has_NOT_SET_attribute() (tests.roles.test_roles.TestRolesTestCase method) test_role_is_an_enum_instance_is_of_roles_class() (tests.roles.test_roles.TestRolesTestCase method) test_role_setter_only_accepts_Role_object_argument() (tests.users.test_users.TestUserTestCase method) test_set_websocket_invalid_type() (tests.controller.test_controller.ApplicationControllerTestCase method) test_start_apache_kafka_producer_does_not_recreate_another_producer_on_the_same_instance_of_fastapi() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) test_start_apache_kafka_producer_sets_fastapi_app_kafka_producer_attribute() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) test_start_apache_kafka_producer_starts_AIOKafkaProducer_with_expected_argument_for_boostrap_servers() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) test_start_apache_kafka_producer_starts_the_kafka_producer() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) test_start_apache_kafka_producer_takes_a_fastapi_object_argument() (tests.api.test_endpoints.ApplicationBackendStartupAndShutdownFunctionsTest method) test_that_connection_to_invalid_chat_websocket_url_cannot_be_established() (tests.api.test_endpoints.WebSocketTestCase method) test_that_controller_has_first_publisher_attribute_which_must_have_role_of_publisher() (tests.controller.test_controller.ApplicationControllerTestCase method) test_that_controller_raises_exception_on_nonsensical_input_for_number_of_participating_users() (tests.controller.test_controller.ApplicationControllerTestCase method) test_that_on_init_of_controller_all_consumers_in_kafka_manager_are_subscribed_to_group_chat_kafka_topic() (tests.controller.test_controller.ApplicationControllerTestCase method) test_that_passed_name_and_display_picture_url_are_applied_to_user_instance() (tests.users.test_users.TestUserTestCase method) test_that_user_object_by_default_has_empty_username_and_image_url() (tests.users.test_users.TestUserTestCase method) test_user_can_be_initialised_with_particular_role() (tests.users.test_users.TestUserTestCase method) test_user_can_be_initialised_with_random_role() (tests.users.test_users.TestUserTestCase method) test_user_class_exists() (tests.users.test_users.TestUserTestCase method) test_user_generate_message_method_calls_google_gemini_api_method_to_generate_message() (tests.users.test_users.TestUserAsyncioMethodsTestCase method) test_user_has_display_picture_attribute() (tests.users.test_users.TestUserTestCase method) test_user_has_name_attribute() (tests.users.test_users.TestUserTestCase method) test_user_has_role_attribute() (tests.users.test_users.TestUserTestCase method) test_user_role_attribute_is_Role_NOT_SET_at_initialisation() (tests.users.test_users.TestUserTestCase method) test_user_role_getter_and_setter_are_properties() (tests.users.test_users.TestUserTestCase method) test_user_role_getter_returns_user_role_value() (tests.users.test_users.TestUserTestCase method) test_user_role_setter_sets_user_role_value() (tests.users.test_users.TestUserTestCase method) test_user_set_random_role_method_randomly_selects_role_on_user_instance() (tests.users.test_users.TestUserTestCase method) TestAddChat (class in tests.utils.functions.test_functions) TestCreateApacheKafkaTopic (class in tests.utils.functions.test_functions) TestCreateMessageJSON (class in tests.utils.functions.test_functions) TestGenerateMessage (class in tests.utils.functions.test_functions) TestGetDB (class in tests.database.test_database) TestKafkaManager (class in tests.controller.test_kafka_manager) TestKafkaManagerFactory (class in tests.controller.test_kafka_manager) TestMessagesJSON (class in tests.json_defs.messages.test_message) TestOperationNotAllowedException (class in tests.utils.exceptions.test_exceptions) TestRolesTestCase (class in tests.roles.test_roles) tests module tests.api module tests.api.test_endpoints module tests.controller module tests.controller.test_controller module tests.controller.test_kafka_manager module tests.database module tests.database.base module tests.database.test_database module tests.json_defs module tests.json_defs.messages module tests.json_defs.messages.test_message module tests.json_defs.requests module tests.json_defs.requests.test_json_request_body_defs module tests.models module tests.models.test_models module tests.roles module tests.roles.test_roles module tests.users module tests.users.test_users module tests.utils module tests.utils.exceptions module tests.utils.exceptions.test_exceptions module tests.utils.functions module tests.utils.functions.test_functions module TestSetUpChatRequestJsonProperties (class in tests.json_defs.requests.test_json_request_body_defs) TestUserAsyncioMethodsTestCase (class in tests.users.test_users) TestUserTestCase (class in tests.users.test_users) thread_id (json_defs.message.message.MessageJSON attribute) U user module User (class in user.user_def) user (tests.users.test_users.TestUserAsyncioMethodsTestCase attribute) user.user_def module utils module utils.exceptions module utils.exceptions.custom_exceptions module utils.functions module utils.functions.utility_functions module uuid (models.chat.Chat attribute) W websocket (controller.controller_def.Controller property) WebSocketTestCase (class in tests.api.test_endpoints) with_role() (user.user_def.User class method) ws_url (controller.controller_def.Controller attribute)