{"id":16915038,"url":"https://github.com/ryancurrah/searchsplunk","last_synced_at":"2025-07-31T23:33:19.801Z","repository":{"id":34200165,"uuid":"38055865","full_name":"ryancurrah/searchsplunk","owner":"ryancurrah","description":"Easily create Splunk searches from Python and get the result as a Python object.","archived":false,"fork":false,"pushed_at":"2024-05-30T02:26:40.000Z","size":22,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-30T09:13:14.756Z","etag":null,"topics":["python","search","splunk","splunk-searches"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryancurrah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-25T14:56:40.000Z","updated_at":"2024-05-30T02:26:42.000Z","dependencies_parsed_at":"2024-12-09T19:15:30.289Z","dependency_job_id":"a9cd2d9c-ea61-48e5-b7db-0767780f3087","html_url":"https://github.com/ryancurrah/searchsplunk","commit_stats":{"total_commits":8,"total_committers":4,"mean_commits":2.0,"dds":0.375,"last_synced_commit":"fd1c837584f320e5d12896b65f3b7f2bf9e3117f"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancurrah%2Fsearchsplunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancurrah%2Fsearchsplunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancurrah%2Fsearchsplunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryancurrah%2Fsearchsplunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryancurrah","download_url":"https://codeload.github.com/ryancurrah/searchsplunk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243848113,"owners_count":20357493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","search","splunk","splunk-searches"],"created_at":"2024-10-13T19:16:15.264Z","updated_at":"2025-03-17T07:31:02.053Z","avatar_url":"https://github.com/ryancurrah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ryancurrah/searchsplunk.svg?branch=master)](https://travis-ci.org/ryancurrah/searchsplunk) [![Coverage Status](https://coveralls.io/repos/github/ryancurrah/searchsplunk/badge.svg?branch=master)](https://coveralls.io/github/ryancurrah/searchsplunk?branch=master)\n\n\n# Search Splunk\n\nEasily create Splunk searches from Python and get the result as a Python object\n\n# Requires\n\n- requests\u003e=2.7.0: https://pypi.python.org/pypi/requests\n\n# Installation instructions\n\n[Searchsplunk](https://pypi.python.org/pypi/searchsplunk) can be installed from PyPi.\n\n```bash\npip install searchsplunk\n```\n\n# Usage instructions\n\n```python\nfrom searchsplunk.searchsplunk import SearchSplunk\ns = SearchSplunk('https://splunk.acme.com:8089', 'MYUSER', 'MYPASS', ssl_verify=True)\nresult = s.search('sourcetype=salt:grains openstack_uid=e0303456c-d5a3-789f-ab68-8f27561ffa0f | dedup openstack_uid')\n\nimport json\nprint json.dumps(result, sort_keys=True, indent=2)\n{\n  \"fields\": [\n    {\n      \"name\": \"_bkt\"\n    },\n    {\n      \"name\": \"_cd\"\n    },\n    {\n      \"name\": \"_indextime\"\n    },\n    {\n      \"name\": \"_kv\"\n    },\n    {\n      \"name\": \"_raw\"\n    },\n    {\n      \"name\": \"_serial\"\n    },\n    {\n      \"name\": \"_si\"\n    },\n    {\n      \"name\": \"_sourcetype\"\n    },\n    {\n      \"name\": \"_subsecond\"\n    },\n    {\n      \"name\": \"_time\"\n    },\n    {\n      \"name\": \"host\"\n    },\n    {\n      \"name\": \"index\"\n    },\n    {\n      \"name\": \"linecount\"\n    },\n    {\n      \"name\": \"openstack_uid\"\n    },\n    {\n      \"name\": \"source\"\n    },\n    {\n      \"name\": \"sourcetype\"\n    },\n    {\n      \"name\": \"splunk_server\"\n    }\n  ],\n  \"init_offset\": 0,\n  \"messages\": [],\n  \"preview\": false,\n  \"results\": [\n    {\n      \"_bkt\": \"main~1122~25B521A6-9612-407D-A1BA-F8KJSEBB7628\",\n      \"_cd\": \"1122:290410720\",\n      \"_indextime\": \"1435071966\",\n      \"_kv\": \"1\",\n      \"_raw\": \"somefile contents\",\n      \"_serial\": \"0\",\n      \"_si\": [\n        \"splunkserv\",\n        \"main\"\n      ],\n      \"_sourcetype\": \"salt:grains\",\n      \"_time\": \"2015-06-23T11:06:05.000-04:00\",\n      \"host\": \"server-7654.acme.com\",\n      \"index\": \"main\",\n      \"linecount\": \"17\",\n      \"openstack_uid\": \"e0303456c-d5a3-789f-ab68-8f27561ffa0f\",\n      \"source\": \"/etc/salt/grains\",\n      \"sourcetype\": \"salt:grains\",\n      \"splunk_server\": \"splunkmaster\"\n    }\n  ]\n}\n```\n\n## Contributors\n\n  - [pkeeper](https://github.com/pkeeper)\n  - [lowell80](https://github.com/lowell80)\n\n## Author\n\n[Ryan Currah](ryan@currah.ca)\n\n## License\n\nGPL v2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryancurrah%2Fsearchsplunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryancurrah%2Fsearchsplunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryancurrah%2Fsearchsplunk/lists"}