cartoframes.utils module¶
general utility functions
-
cartoframes.utils.cssify(css_dict)¶ Function to get CartoCSS from Python dicts
-
cartoframes.utils.dict_items(indict)¶ function for iterating through dict items compatible with py2 and 3
Parameters: indict (dict) – Dictionary that will be turned into items iterator
-
cartoframes.utils.dtypes2pg(dtype)¶ Returns equivalent PostgreSQL type for input dtype
-
cartoframes.utils.gen_variable_name(value)¶
-
cartoframes.utils.get_hash(text)¶
-
cartoframes.utils.importify_params(param_arg)¶ Convert parameter arguments to what CARTO’s Import API expects
-
cartoframes.utils.join_url(*parts)¶ join parts of URL into complete url
-
cartoframes.utils.merge_dicts(dict1, dict2)¶
-
cartoframes.utils.minify_sql(lines)¶ eliminate whitespace in sql queries
-
cartoframes.utils.pgquote(string)¶ single-quotes a string if not None, else returns null
-
cartoframes.utils.safe_quotes(text, escape_single_quotes=False)¶ htmlify string
-
cartoframes.utils.temp_ignore_warnings(func)¶ Temporarily ignores warnings like those emitted by the carto python sdk
-
cartoframes.utils.text_match(regex, text)¶
-
cartoframes.utils.unique_colname(suggested, existing)¶ Given a suggested column name and a list of existing names, returns a name that is not present at existing by prepending _ characters.