fasjson.web.utils package

Submodules

fasjson.web.utils.ipa module

fasjson.web.utils.ipa.get_attrs_from_mask(model)[source]
fasjson.web.utils.ipa.get_fields_from_ldap_model(ldap_model, endpoint, field_args=None)[source]
fasjson.web.utils.ipa.ldap_client()[source]
fasjson.web.utils.ipa.rpc_client()[source]

fasjson.web.utils.pagination module

fasjson.web.utils.pagination.add_page_data(output, result, model)[source]

Use the pagination data from the LDAP result to add page info to the output.

This function adds a dictionary with pagination info in a page key in the output dictionary. The pagination dictionary contains:

  • page_number: the current page number

  • page_size: the number of items per page

  • total_results: the total number of items in the entire recordset

  • total_pages: the number of pages available

  • next_page: the URL to the next page if there is one. On the last page, this key is absent.

If the query was not paginated, this page dictionary is not added to the output dictionary.

This function does not return anything, the output dictionary is modified in-place.

fasjson.web.utils.pagination.paged_marshal(result, model, **kwargs)[source]

fasjson.web.utils.request_parsing module

fasjson.web.utils.request_parsing.add_exact_arguments(parser, model)[source]

Module contents

fasjson.web.utils.maybe_anonymize(user)[source]