Is it possible to use a defined lookup, within a custom python command ?
If not, is it possible to access directly the csv file from the lookup, in order to process to a kind of lookup in the function ?
Is this what you are looking for?
http://answers.splunk.com/answers/1104/lookups-with-a-python-script
Good question. I doubt it's possible to directly access a lookup from within a custom python search command. However, it should be possible to use the REST APIs to call back into splunk, get information about the location of a specific lookup file and then simply open it using Python's own csv module. This really only works for the simplest cases. For example, scripted lookups wont work. You'll have to implement any "extra" features that you need. (For example, a match_type
of WILDCARD or CIDR).