In java, local service can call other remote service just like local method benefit from @FeignClient annoation.
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteFileService
{
/**
* upload file
*
* @param file 文件信息
* @return 结果
*/
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
}
So, my question is, is there a declarative call framework in python like OpenFeign in java ? It must can send HTTP request with Nacos.
I found some such as
- Uplink
- Pyro
- gRPC
- apiron
but I’m not satisfied with them because they must declare an url variable likehttps://example.com
, I think it violate the principles of service discovery.
Please see above, I have tried some frameworks.