First time using an API...

andrea crotti andrea.crotti.0 at gmail.com
Thu Feb 17 10:17:53 EST 2011


2011/2/17 Matty Sarro <msarro at gmail.com>

> This may be kind of a stupid question, so please be gentle.
> I've only ever used most programming in the past when shell scripting
> couldn't handle what I needed done. So, I rarely dabble with things
> like API's, or even python-isms. I just program to get things done.
>
> Well, that's about to change :)
> I am in charge of deploying a platform to allow people across my
> company to access a variety of crunched metrics using splunk. I need
> to allow access into the data using Splunk's RESTful API, which is
> implemented in both java and python. The thing is, I have no idea how
> to do that. I've looked through some of the documentation, and it has
> me start a pydoc server on the system but when i navigate to the page
> it just shows listings of functions. The descriptions would be great,
> except they don't really tell me a lot. For instance, nothing really
> seems to say "fetchRecord(user_name) fetches all records matching a
> particular user name". Further, how do I actually use the API?
>
> I appreciate any of the pointers you can offer. Its a big part of this
> project, but my minor knowledge in programming isn't helping me much
> here.
> -Matty
> --
> http://mail.python.org/mailman/listinfo/python-list


Well things are not always (almost never) documented as you would like.
A suggestion I can give is to use ipython and play with the modules.
Pass something in and see what you get.

And better yet write some unit tests to see if the functions do what you
expect they do.
If the API is not completely dumb you should understand quickly how to use
it.

Also some other code that uses that library might be useful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110217/463a1446/attachment-0001.html>


More information about the Python-list mailing list