Package: mahdix
Print Somethingfrommahdiximportp

p('YOUR TXT')Get Current Timefrommahdiximporttimeprint(time())Generate Text Logofrommahdiximportmakelogologo=makelogo(text='Mahdi')print(logo)Random Numbersfrommahdiximportrandom7,random8,random9,random1_2,random1_3,random1_4,random10

print(random7())print(random8())print(random9())print(random1_2())print(random1_3())print(random1_4())print(random10())html_req FunctionThe html_req function fetches HTML content from the specified URL, using optional headers and data for the request.frommahdiximporthtml_requrl='https://example.com'headers={'User-Agent':'Your User Agent','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8','Accept-Language':'en-US,en;q=0.9','Accept-Encoding':'gzip, deflate, br','Connection':'keep-alive',}cookie={'key':'value'}## Optional Cookes for POST requestsdata={'key':'value'}## Optional data for POST requestsparams={'q':'params_valu',}# you can add json--   json_data={"json" : "valu"}parsed_html=html_req(url,Headers=headers,Data=data,Cookie=cookie,Params=params)## data for POST requestsparsed_html=html_req(url,Headers=headers,Cookie=cookie,Params=params)##  for Get requestsprint(parsed_html)The html_txt function fetches HTML content from any request responce.frommahdiximporthtml_txtresponce=requests.get('https://example.com').texttext_html=html_txt(responce)print(text_html)#get respone as html textsearch_as_re Function# this function is search a Specific text from any text base on re modulsfrommahdiximportfindall_as_refull_text="This is some example text. Starting:apple, Finding:banana, Finding:orange, Ending:grape, Finding:pear,"//DefaultvalueNonestarting_text="Starting:"//DefaultvalueNonefinding_text="Finding:"//DefaultvalueNoneending_text=","//Defaultvalue','# Using search_as_reresult_search=search_as_re(full_text,starting_text,ending_text)print("Result from search_as_re:",result_search)# out put : applefindall_as_re Function#this function  find a list of  Specific text from any text ans returnfrommahdiximportfindall_as_refull_text="This is some example text. Starting:apple, Finding:banana, Finding:orange, Ending:grape, Finding:pear,"//DefaultvalueNonestarting_text="Starting:"//DefaultvalueNonefinding_text="Finding:"//DefaultvalueNoneending_text=","//Defaultvalue','result_findall=findall_as_re(full_text,finding_text,ending_text)print("Result from findall_as_re:",result_findall)# out put : {'banana', 'pear', 'orange'}System CommandsfrommahdiximportsysT

sysT('YOUR COMMAND')HTTP Requestsfrommahdiximportrqg,rqpresponse_get=rqg('https://example.com')response_post=rqp('https://example.com',data={'key':'value'})Random Choicesfrommahdiximportrc

print(rc([1,2,3,4]))Base64 Encoding/Decodingfrommahdiximportbsec,bsdcencoded_data=bsec('Hello, World!')decoded_data=bsdc(encoded_data)Colors# ---[coloure]------RED=mahdix.REDGREEN=mahdix.GREENYELLOW=mahdix.YELLOWBLUE=mahdix.BLUEORANGE=mahdix.ORANGELI_BLUE=Light_BLUELI_MAGENTA=Light_MAGENTALI_CYAN=Light_CYANLI_WHITE=Light_WHITE

BackgroundcolorsBG_BLACK=Background_BLACKBG_RED=Background_REDBG_GREEN=Background_GREENget any Facebook id created datefrommahdiximportgetyearid# Example: cid = '100000000023456'print(getyearid(cid))Example of  html_txt function.html_txt Function