chubin / cheat.sh

the only cheat sheet you need
https://cheat.sh/
MIT License
38.41k stars 1.79k forks source link

Python lib for making calls #71

Open dstrohl opened 6 years ago

dstrohl commented 6 years ago

If there was a python lib for this, it could be used within the python shell in my ide (PyCharm), or probably any other decent ide, with little or no special plugins needed. Secondarily, a windows command option would be helpful since the bash script nor curl works with windows without something like cywin. (and please no windows bashing, I prefer Linux as well, but you work with what you are given at many jobs).

dbeniamine commented 6 years ago

and there is a small snippet

def cht(query):
    import requests
    ans=requests.get("https://cht.sh/"+query+"?T")
    print(ans.text)

Then you can just call something cht("python/how+to+make+a+list")

ClariNerd617 commented 8 months ago

Please never import a library inside a function, we want to encourage good coding practices, especially when making a cheat sheet.