| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Hi, please take a look at this: https://github.com/splunk/splunk-sdk-python/blob/develop/CONTRIBUTING.md |
Sorry, something went wrong.
|
Thanks for the pointer — here's where this PR stands against CONTRIBUTING.md:
Let me know if anything else is needed to move this forward. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description of PR
Adds an HECToken entity and HECTokens collection to splunklib.client, wrapping the data/inputs/http/ REST endpoint.
HTTP Event Collector is widely used for data ingestion, but the SDK has no entity class for managing HEC tokens — users must use raw REST calls. This PR follows the same Entity/Collection pattern used throughout client.py.
Changes:
Usage:
Note: Splunk prefixes HEC token names with http:// (e.g. creating my_token results in name http://my_token). This is standard Splunk behavior, not an SDK issue.
Testing the changes
Unit tests added in tests/unit/test_hec_token.py (3 tests):
Tested with Python 3.13, Splunk Enterprise 10.4.0. Passes ruff check, ruff format, and basedpyright.
Documentation
Docstrings follow existing SDK conventions. The enable()/disable() methods mirror the pattern used by other entities that support toggling (e.g. SavedSearch).
Dependencies and other resources
No external dependencies. Follows the same Entity/Collection pattern as SavedSearch, Index, and others in client.py.