问题
I have been googling and searching some good example(s) and so far somewhat closest was this one: Architecting a RESTFul C++ api to interface with Python
In a nutshell: Essentially, I am building .so files using cython (via building Python Extension module with Bindings from *.c source file).
Scope/Requierments:
- As first prio - I need to add codebase in *.c file that lets to download an file from certain endpoint (lets say some cloud storage) and as bonus would be able to communicate with REST APIs as well ( so kind of libcurl integration is lurking in my imagination ). Important aspect is that C code must be Python Binded so I/ produced *.so or *.dll library can communicate from Python and to Python.
- As per next requierment (second prio) - to load any similar DLL or SO library at runtime ( dynamically ), I have not yet found good example, so that would also be great. But that is sepeprate question.
What I have tried:
- pure C code, that uses net/http header, simillary to one I use in my Java project, yet that is failing in compilation.
Therefore - questions is:
- how to achieve first prio and is there an example or at least clear guide how to add compatible code in *.c file to achieve this functionality?
来源:https://stackoverflow.com/questions/58920364/cython-buildable-python-binded-c-code-to-download-file-via-http-rest-api