0

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.

Francisco Puga
  • 23,869
  • 5
  • 48
  • 64
  • check [this](http://stackoverflow.com/questions/12237894/using-java-based-api-with-django?rq=1) if it helps – maxx777 Apr 16 '14 at 21:47
  • Thanks. But, that one seems specifically for google-android-market. Rundeck does not have a similar Python porting. – user1542006 Apr 16 '14 at 21:52
  • I'm a bit late to this and @mipadi did a fine job of answering the question. Just wanted to note that rundeckrun was specifically created to solve this problem. :) – marklap Oct 27 '14 at 15:34
  • Duplicate and outdated, see https://stackoverflow.com/q/11663945/930271 or https://stackoverflow.com/q/30259452/930271 or https://stackoverflow.com/q/12732375/930271 – Francisco Puga Jun 15 '17 at 14:08

1 Answers1

1

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.

mipadi
  • 398,885
  • 90
  • 523
  • 479