質問

I need to call some Java API from Django, specifically Rundeck API. I looked around and django-jython is no longer supported. What other ways can I do it? I have looked at rundeckrun (a Python client library for Rundeck API but I need to only use the Rundeck native Java API).

Assuming Rundeck supports REST API, would something like django-tastypie work?

Edit: As per Consuming a RESTful API with Django, tastypie creates REST API and not consumes it. Apparently, the regular urllib, requests module, etc. does the trick.

役に立ちましたか?

解決

The page you linked to is the documentation for a RESTful Web API. If you're trying to access Rundeck through that, you don't need anything fancy -- you can just use something like the requests library to make your HTTP calls. Apps like tastypie are for creating your own APIs, not accessing others' APIs.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top