Primary Modules¶
Additions to the primary modules.
Added the private function
khoros.api._get_v2_return_values()to address possibleKeyErrorexceptions in thekhoros.api.deliver_v2_results()function.
Release Date: 2020-05-25
Additions to the primary modules.
Added the private function khoros.api._get_v2_return_values() to address possible
KeyError exceptions in the khoros.api.deliver_v2_results() function.
Additions to the documentation.
Added the Working with Boards document as a tutorial for managing boards.
Changes to the primary modules.
Removed the assert function call from the khoros.core.Khoros._populate_construct_settings() method.
Updated the khoros.api.parse_v2_response() function so that the http_code
value returns as an integer rather than a string.
Replaced the return_developer_message argument with return_error_messages in the
khoros.api.parse_v2_response(), khoros.api.deliver_v2_results(),
khoros.structures.boards.create() and khoros.core.Khoros.Board.create() functions.
Updated the khoros.api.parse_v2_response() function to merge the message and
developer_message response values into the error_msg field in the dictionary, and included
the split_errors argument which determines if they should be split within a tuple or consolidated
into a single string separated by a hyphen. (e.g. Invalid query syntax - An invalid value was passed...)
Included the split_errors argument in the khoros.api.deliver_v2_results(),
khoros.structures.boards.create() and khoros.core.Khoros.Board.create() functions.
Changes to the supporting modules.
Renamed the khoros.utils.core_utils.__is_zero_length() function to be
khoros.utils.core_utils._is_zero_length() instead.
Renamed the khoros.utils.core_utils.__structure_query_string() function to be
khoros.utils.core_utils._structure_query_string() instead.
Changes to the documentation.
Added the Working with Boards page to the Python SDK for Khoros Communities home page.
Release Date: 2020-05-20
Additions to the primary modules.
Added the khoros.studio module with the khoros.studio.base sub-module.
khoros.core.Khoros.Studio subclass with the following functions:Added the khoros.core.Khoros._import_studio_class() function and associated function call.
Additions to the supporting modules.
Added the khoros.utils.core_utils.run_cmd() function.
Added the khoros.utils.core_utils.decode_binary() function.
Additions to the documentation.
Added the khoros.core.Khoros.Board subclass to the primary modules page.
Added the khoros.studio module to the primary modules page.
Changes to the documentation.
Swapped the Objects Module (khoros.objects) section with the Structures Module (khoros.structures) section on the primary modules page.
Release Date: 2020-05-18
Additions to the primary modules.
khoros.api module:khoros.api._api_request_without_payload()
khoros.api._report_failed_attempt()
khoros.api._raise_exception_for_repeated_timeouts()
khoros.api._attempt_json_conversion()
khoros.objects.users module:khoros.structures.boards module with the following functions:khoros.structures.boards._structure_id_and_title()
khoros.structures.boards._structure_discussion_style()
khoros.structures.boards._structure_parent_category()
khoros.structures.boards._structure_simple_fields()
khoros.structures.boards._structure_label_settings()
khoros.structures.boards._structure_blog_settings()
khoros.structures.boards._structure_contest_settings()
khoros.structures.boards._warn_about_ignored_settings()
Added the khoros.structures.categories.create() function.
Added khoros.core.Khoros.Category.create() method.
Added the khoros.core.Khoros.User.get_ids_from_login_list() method.
Added the khoros.core.Khoros.Board class with the
khoros.core.Khoros.Board.create() method.
Added the khoros.core.Khoros._import_board_class() method and accompanying method call.
Additions to the supporting modules.
Added the khoros.utils.core_utils.convert_dict_id_values_to_strings() function.
Added the khoros.utils.core_utils.extract_key_values_from_dict_list() function.
Added the khoros.utils.core_utils.convert_list_values() function.
khoros.utils.tests.test_core_utils module with the following functions:khoros.utils.tests.test_core_utils.test_query_string_encoding()
khoros.utils.tests.test_core_utils._check_type_and_items()
Additions to the documentation.
Added the khoros.structures.boards module to the primary modules page.
Added the khoros.utils.tests.test_core_utils module to the
supporting modules page.
Added a docstring to the khoros.api._get_json_query_string() function.
Changes to the primary modules.
Updated the khoros.api.post_request_with_retries(), khoros.api.put_request_with_retries() and
khoros.api._api_request_with_payload() functions to perform the API requests even if no JSON payload is
provided, and to leverage the new khoros.api._report_failed_attempt() and
khoros.api._raise_exception_for_repeated_timeouts() functions.
Updated the khoros.api.get_request_with_retries() function to leverage the new
khoros.api._report_failed_attempt() and khoros.api._raise_exception_for_repeated_timeouts()
functions.
Updated the khoros.api.get_request_with_retries(), khoros.api.post_request_with_retries() and
khoros.api.put_request_with_retries() functions to utilize the
khoros.api._attempt_json_conversion() function.
Updated the khoros.objects.messages.create() to leverage the khoros.api.parse_v2_response()
function.
Added the khoros.structures.boards module to the __all__ special variable in the
khoros.structures (i.e. __init__.py) module and imported it by default.
Deprecations in the primary modules.
Deprecated the khoros.core.Khoros.Message.parse_v2_response() function as it was replaced with the
khoros.core.Khoros.parse_v2_response() function which is a bit more generalized.
Deprecated the khoros.objects.messages.parse_v2_response() function as it was replaced with the
khoros.api.parse_v2_response() function which is a bit more generalized.
Release Date: 2020-05-11
Additions to the primary modules.
khoros.objects.messages module:khoros.objects.messages._get_required_user_mention_data()
khoros.objects.roles module with the following functions:Added the khoros.objects.messages.MESSAGE_SEO_URLS dictionary constant.
khoros.core.Khoros class:Added the from . import roles statement to the khoros.objects module and added roles
to the __all__ special variable.
khoros.core.Khoros.Role inner class with the following methods:Added the method khoros.core.Khoros._import_role_class() to the core object and
added the method call in the initialization method.
Additions to the supporting modules.
Added the khoros.utils.tests.test_mentions unit test module.
Additions to the documentation.
Added khoros.utils.tests.test_mentions to the Support Modules page.
Added khoros.objects.roles to the primary modules page.
Added khoros.core.Khoros.Role to the primary modules page.
Added a code coverage badge to the README.md file.
Added a code coverage section to the pythonpackage.yml file.
Added the codecov.yml file for coverage reports.
Changed the PyPI Development Status in setup.py to be Development Status :: 4 - Beta.
Fixes to the primary modules.
Fixed how and when values are cast to integers in khoros.objects.users._get_user_identifier().
Added missing method calls for the khoros.core.Khoros._import_message_class() and
khoros.core.Khoros._import_album_class() methods in the initialization method for the
khoros.core.Khoros class.
Release Date: 2020-05-08
Additions to the primary modules.
Added the khoros.api.encode_multipart_data() function.
khoros.objects.messages module:khoros.objects.messages._verify_required_fields()
khoros.objects.messages._confirm_field_supplied()
khoros.objects.attachments module with the following functions:khoros.objects.attachments._format_single_file()
khoros.objects.attachments._format_multiple_files()
khoros.objects.albums module with the following functions:khoros.objects.albums._null_to_blank()
khoros.core.Khoros class:khoros.core.Khoros._import_album_class()
khoros.core.Khoros._import_message_class()
khoros.core.Khoros.Album inner class with the following methods:khoros.core.Khoros.Message inner class with the following methods:Added an import statement for khoros.objects.albums to the khoros.objects module.
Additions to the supporting modules.
Added the khoros.utils.core_utils.convert_single_value_to_tuple() function.
Added the khoros.utils.core_utils.convert_string_to_tuple() function.
Added the khoros.utils.core_utils.is_numeric() function.
Added the khoros.errors.exceptions.DataMismatchError exception class.
Additions to the documentation.
Added the Utilizing environment variables section to the Introduction page.
Updated the README.md file to match the Introduction page.
Added the khoros.objects.messages module to the primary modules page.
Added the khoros.objects.albums module to the primary modules page.
Added the khoros.objects.attachments module to the primary modules page.
Added the khoros.core.Khoros.Album class to the primary modules page.
Added the khoros.core.Khoros.Message class to the primary modules page.
Added the SECURITY.md and CODE_OF_CONDUCT.md files to the source repository.
Added requests-toolbelt==0.9.1 to the requirements.txt file.
Changes to the primary modules.
Updated the khoros.core.Khoros class so that environment variables are ignored if a Helper
configuration file is supplied when instantiating the core object.
multipart/form-data API calls in functions below.khoros.api._api_request_with_payload()
Added the associated exception type (e.g. ValueError) to the failure messages in
khoros.api.get_request_with_retries() and khoros.api._api_request_with_payload().
Updated the khoros.api.get_request_with_retries() to use the
khoros.errors.exceptions.APIConnectionError exception class rather than ConnectionError.
Updated the khoros.api.get_request_with_retries() and khoros.api._api_request_with_payload()
functions to only retry if relevant exception classes are raised in the try/except.
Added functionality to khoros.api.post_request_with_retries() and
khoros.api.put_request_with_retries() to display an error but still return the API response if unable
to convert the response to JSON format when requested.
Renamed the khoros.api.__api_request_with_payload() function to be
khoros.api._api_request_with_payload() instead.
Replaced print() statements in the khoros.api.get_request_with_retries() and
khoros.api._api_request_with_payload() functions with khoros.errors.handlers.eprint()
function calls.
Added the multipart Boolean argument to the khoros.api.define_headers() which will remove the
Content-Type header key and value if the API call is for a multipart/form-data query.
Added the allow_exceptions argument (True by default) to the khoros.liql.perform_query()
function to allow the khoros.errors.exceptions.GETRequestError exception to be disabled if an
error response is returned.
Updated the error/exception message in the khoros.liql.perform_query() to be more specific.
Changes to the documentation.
Added a full docstring to the khoros.api._api_request_with_payload() function.
Fixes to the primary modules.
Removed the Aurea reference from the failure message in khoros.api._api_request_with_payload.
Fixes to the supporting modules.
Changed “v1” to “v2” in the full error message string within the
khoros.errors.handlers._get_v2_error_from_json() function.
Release Date: 2020-04-26
Additions to the primary modules.
khoros.core.Khoros object.Added the khoros.core.Khoros._parse_env_settings() method to parse the environmental variables.
Added the khoros.core.Khoros._session_auth_credentials_defined() method to automatically set the
auth_type value in the _settings attribute to be session_auth if a session authentication username
and password have been defined.
Additions to the supporting modules.
khoros.utils.environment module with the following functions and constants:khoros.utils.environment._env_variable_exists()
khoros.utils.environment._get_env_variable_value()
khoros.utils.environment._update_env_list()
khoros.utils.environment._update_env_mapping()
khoros.utils.environment._import_custom_names_file()
khoros.utils.environment.ENV_VARIABLE_NAMES
Added the khoros.utils.core_utils.get_file_type() function.
Added the khoros.errors.exceptions.UnknownFileTypeError exception class.
Added the khoros.utils.tests.test_helper_file unit test module.
New additions to the example files for the library.
Added the custom_env_variables.json file.
Added the custom_env_variables.yml file.
Additions to the documentation.
Added the khoros.utils.environment module to the supporting modules page.
Added the khoros.utils.tests.test_helper_file module to the
supporting modules page.
Added the encrypted YAML Helper configuration file khoros_helper.yml.gpg in the
khoros/utils/tests/ directory for use with pytest.
Added the shell script decrypt_helper.sh in the .github/scripts/ directory per
GitHub guidelines.
Updated the pythonpackage.yml workflow for GitHub Actions to decrypt the helper configuration file (YAML)
and utilize environment variables.
Changes to the primary modules.
Made an adjustment to the khoros.core.Khoros object class so that any values explicitly passed via
the settings argument will overwrite any existing settings defined by default values and/or
environmental variables.
Added khoros.structures.base to the __all__ special variable in khoros.structures.
Added khoros.objects.messages to the __all__ special variable in khoros.objects and added
an import statement to import the module by default.
Removed khoros.objects.base from the __all__ special variable in khoros.objects and removed
the import statement to prevent the module from being imported by default.
Changes to the supporting modules.
Replaced the yaml.load() function call with yaml.safe_load() in
khoros.utils.helper.import_yaml_file() as it is a better security practice.
Introduced support for JSON formatted helper configuration files in khoros.utils.helper.
Removed the extra preceding underscore in private functions within khoros.utils.helper.
Changes to the documentation.
Added :special-members: __init__ to the khoros and khoros.core modules to display the
docstrings for the __init__ method in the khoros.core.Khoros object class.
Replaced NoneType with None in function and method docstrings to use proper syntax and to comply with
PEP 287.
Release Date: 2020-04-23
Additions to the primary modules.
Added the khoros.liql.get_total_count() function.
Added the khoros.core.Khoros.get_total_count() method within the core Khoros object.
Added the khoros.structures module.
khoros.structures.base module with the following functions and class:khoros.structures.base._check_url_for_identifier()
khoros.structures.categories module with the following functions:khoros.structures.communities module with the following functions:khoros.structures.communities._check_for_multiple_tenants()
khoros.structures.communities.get_permitted_attachment_types()
khoros.structures.communities.email_confirmation_required_to_post()
khoros.structures.communities.get_ooyala_player_branding_id()
khoros.structures.communities.top_level_categories_enabled()
khoros.structures.communities.show_community_node_in_breadcrumb()
khoros.structures.communities.show_breadcrumb_at_top_level()
khoros.structures.communities.top_level_categories_on_community_page()
khoros.structures.nodes module with the following functions and classes:khoros.structures.nodes._get_node_type_identifier()
khoros.core.Khoros.Category inner class with the following methods:khoros.core.Khoros.Community inner class with the following methods:khoros.core.Khoros.Community.get_permitted_attachment_types()
khoros.core.Khoros.Community.email_confirmation_required_to_post()
khoros.core.Khoros.Community.get_ooyala_player_branding_id()
khoros.core.Khoros.Community.show_community_node_in_breadcrumb()
khoros.core.Khoros.Community.top_level_categories_on_community_page()
khoros.core.Khoros.Node inner class:Added the khoros.core.Khoros._import_category_class() method and accompanying method call.
Added the khoros.core.Khoros._import_community_class() method and accompanying method call.
Added the khoros.liql.COLLECTIONS constant.
Additions to the supporting modules.
Added the khoros.utils.core_utils.display_warning() function.
Additions to the documentation.
Added the khoros.structures module and its submodules to the primary modules page.
Changes to the primary modules.
Updated the khoros.objects to import all submodules by default.
Moved the khoros.objects.base.get_node_id() function to the khoros.structures.nodes module
and added a DeprecationWarning.
Moved the khoros.objects.base.get_node_type_from_url() function to the khoros.structures.nodes
module and added a DeprecationWarning.
Moved the khoros.objects.base.__get_node_type_identifier() function to the khoros.structures.nodes
module and added a DeprecationWarning.
Moved the khoros.objects.base.Mapping class to the khoros.structures.nodes module and added
a DeprecationWarning.
Added the khoros.structures.nodes.Mapping.avatar_size_mapping dictionary.
Fixes to the primary modules.
Removed some print debugging that hadn’t been removed in the khoros.api.query_successful() function.
Fixes to the documentation.
Fixed the module name in the header docstring for the khoros.objects module.
Fixed a typo in the docstring for the khoros.objects.users.query_users_table_by_id() function.
Additions to the supporting modules.
Fixed the khoros.utils.tests.test_node_id_extract to use the new khoros.structures.nodes module.
Release Date: 2020-04-10
Additions to the primary modules.
Added the khoros.core.Khoros.perform_v1_search() method.
Added the khoros.core.Khoros._import_node_class() and khoros.core.Khoros._import_user_class()
methods within the core khoros.Khoros object class.
Added the khoros.core.Khoros.Node inner class within the core khoros.Khoros object class.
khoros.core.Khoros object class:Added the khoros.core.Khoros.User inner class within the core khoros.Khoros object class.
khoros.core.Khoros object class:Added the khoros.api.query_successful() function.
Added the khoros.api.get_results_count() function.
Added the khoros.api.get_items_list() function.
Added the khoros.api.perform_v1_search() function.
Added the khoros.api.delete() function.
Added the new khoros.objects module to contain sub-modules for the various API objects.
khoros.objects.base module with the following functions and classes:khoros.objects.base.__get_node_type_identifier()
khoros.objects.users module with the following functions:khoros.objects.users._get_where_clause_for_user_id()
khoros.objects.users._get_where_clause_for_username()
khoros.objects.users._get_where_clause_for_email()
khoros.objects.users._get_user_identifier()
khoros.objects.users._get_count()
khoros.objects.users._get_sum_weight()
Additions to the supporting modules.
Added the khoros.utils.core_utils.decode_html_entities() function.
khoros.errors.handlers module.khoros.errors.handlers._get_v1_error_from_json()
khoros.errors.handlers._get_v2_error_from_json()
khoros.errors.handlers._import_exception_classes()
khoros.errors.handlers._exceptions_module_imported()
khoros.errors.handlers._import_exceptions_module()
khoros.utils.tests.test_node_id_extract module with the following functions:Additions to the documentation.
Added the Core Object Subclasses to the primary modules page.
Added the khoros.objects module and the khoros.objects.base and khoros.objects.users
sub-modules to the primary modules page.
Added the khoros.utils.tests.test_node_id_extract module to the
supporting modules page.
Added PyCharm Python Security Scanner to the pythonpackage.yml file.
Changes to the primary modules.
Updated the khoros.liql.perform_query() function to allow a raw LiQL query to be passed rather than only
pre-formatted query URLs.
Updated the khoros.liql.perform_query() function to include an optional verify_success argument which
verifies that the API query was successful and raises the khoros.errors.exceptions.GETRequestError
exception if not.
Removed the unnecessary import requests line in the khoros.liql module.
Renamed the khoros.core.Khoros.__connect_with_session_key() method to be
khoros.core.Khoros._connect_with_session_key() (single underscore prefix) instead.
Renamed the khoros.core.Khoros.__define_url_settings() method to be
khoros.core.Khoros._define_url_settings() (single underscore prefix) instead.
Renamed the khoros.core.Khoros.__parse_helper_settings() method to be
khoros.core.Khoros._parse_helper_settings() (single underscore prefix) instead.
Renamed the khoros.core.Khoros.__populate_auth_settings() method to be
khoros.core.Khoros._populate_auth_settings() (single underscore prefix) instead.
Renamed the khoros.core.Khoros.__populate_construct_settings() method to be
khoros.core.Khoros._populate_construct_settings() (single underscore prefix) instead.
Renamed the khoros.core.Khoros.__populate_core_settings() method to be
khoros.core.Khoros._populate_core_settings() (single underscore prefix) instead.
Renamed the khoros.core.Khoros.__validate_base_url() method to be
khoros.core.Khoros._validate_base_url() (single underscore prefix) instead.
Changes to the supporting modules.
Updated the khoros.errors.exceptions.CurrentlyUnsupportedError exception class to allow the respective
feature to be passed as a string argument for it to be explicitly referenced in the exception message.
Updated the khoros.errors.handlers.get_error_from_html() function to have a second v1 argument, which
is False by default.
Changes to the documentation.
Updated the docstring in khoros.api.query_successful() indicating the API response should be in JSON format.
Changed the Development Status in setup.py to be 3 - Alpha.
Fixes in the primary modules.
Updated the khoros.liql.format_query() function to properly encode the double-quote (") character and
several other special characters.
Fixes in the documentation.
Fixed two bad hyperlinks in the README.md file.
Fixed the docstrings in the khoros.errors.exceptions.InvalidOperatorError exception class to be accurate.
Fixed the docstrings in the khoros.errors.exceptions.OperatorMismatchError exception class to be accurate.
Release Date: 2020-03-22
Additions to the primary modules.
Added the khoros.core.Khoros.signout() method.
Added the khoros.auth.get_oauth_authorization_url() function.
Added the khoros.auth.get_oauth_callback_url_from_user() function.
Added the khoros.auth.invalidate_session() function.
khoros.api module with the following functions:khoros.api.__api_request_with_payload()
Additions to the supporting modules.
Added the khoros.utils.core_utils.get_random_string() function.
Added the khoros.utils.core_utils.__structure_query_string() function.
Additions to the documentation.
Added the khoros.api module to the primary modules page.
Changes to the primary modules.
Updated the core khoros.core.Khoros class to include the active Boolean flag in self.auth.
Updated the khoros.liql.perform_query() function to utilize the
khoros.api.get_request_with_retries() function.
Made minor docstring adjustments to the khoros.liql.perform_query() function.
Changes to the supporting modules.
Added the no_encode argument and associated functionality to the
khoros.utils.core_utils.encode_query_string() function.
Release Date: 2020-03-17
Additions to the primary modules.
Added the khoros.utils.version.warn_when_not_latest() function call to the main khoros module.
Additions to the supporting modules.
Added the khoros.utils.version.get_latest_stable() function.
Added the khoros.utils.version.latest_version() function.
Added the khoros.utils.version.warn_when_not_latest() function.
Additions to the documentation.
Added the Changelog and Usage sections to the README.md file.
Created the Change Log page and populated it with the v1.1.0 changes.
Created the primary modules and supporting modules pages.