A collection of common codes or wrapper functions to simplify the coding time
Project description
# MrSnippets A collection of common codes or wrapper functions to simplify the coding time
## =====Helper Functions=====
Its an collection of commonly used functions to minimize the code and time.
### List of supported functions,
get_clean_text(string:str)
get_numbers_from_string(string:str)
get_alpha_from_string(string:str)
get_clean_list(list_x:list)
get_clean_json_string(json_chunk,key)
clean_dict(dict)
get_string_from_html(soup)
convert_base64_Image(encoded_data,path_to_store,file_name)
## =====Soup Helpers=====
Its an simple implementation of css selector using Beautifulsoup. The selectors are stright forward and simple.
There are list of pre-defined selector functions. For example selecting a single element from chunk as follows.
##### get_element(soup=’’,tag=’’,attributeName=’’,attributeValue=’’)
### List of fucntions supported now,
get_element(soup, tag=”div”, attributeName=’class’, attributeValue=’profile’)
get_elements(soup, tag=”div”, attributeName=’class’, attributeValue=’profiles’)
find_sibling_text(soup, child:str, sibling:str, contains_string:str, sibling_type=”prev|next”)
extract_hyper_link(soup_chunk,patterns:list,**kwargs)
extract_vcard_link(soup_chunk,**kwargs)
extract_image_link(soup_chunk,**kwargs)
extract_vcard_data(vcard_text:str)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for MrSnippets-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aea6990963f5ffecf81350ad77bfaaa365d36dc3fcd1e88820e8d3ccc0f81a99 |
|
MD5 | b75e810924425e039e503d790997aba8 |
|
BLAKE2b-256 | 20fe2a49a518d9d96d3ae2a0970345223da5476b845c3856a8fbe51e7d832ad0 |