Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I find it hard to trust a tutorial that tells me forking curl is an exemplary way to interact with a local restful API in Python.


curl is the default method for a lot of simple AI API tutorials, unfortunately, although running a curl command in Python is a new one.

It's very easy to port it to Python requests or a similar HTTP library, at the least.


It also manages to have both command injection vulnerabilities (passing untrusted data directly to a shell) as well as json injection vulnerabilities (templating untrusted data directly into json).


It is not so bad. I routinely fork processes to integrate useful code with Common Lisp and Racket code. What is a millisecond process startup time between friends :-)

I agree that since Ollama provides a nice REST API, why not use that.


Yeah. WTF? Have they not heard of urllib2?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: