Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Helpers for parsing user input, generating menus, transforming data, making comparisons, flexible argument acceptance (string to list/set), regex matching, and more
::
% pip3 install input-helper
.. code:: python
In [1]: import input_helper as ih
In [2]: real_args = ih.string_to_set('arg1, arg2, arg3')
In [3]: real_val = ih.from_string('true')
In [4]: response = ih.user_input('type some input, human')
In [5]: selected = ih.make_selections(list_of_items)
In [6]: seconds = ih.timestamp_to_seconds('1h22m33s')
In [7]: urls = ih.get_all_urls('some-file-with-urls.txt', 'https://blah.net')
In [8]: from pprint import pprint
In [9]: mm = ih.matcher.MasterMatcher(debug=True)
In [10]: pprint(mm('@handle1 and @handle2 here are the #docs you requested https://github.com/kenjyco/input-helper/blob/master/README.md'))
{'_key_matcher_dict': {'mention_list': 'MentionMatcher',
'non_url_text': 'NonUrlTextMatcher',
'tag_list': 'TagMatcher',
'text': 'IdentityMatcher',
'url_details_list': 'UrlDetailsMatcher',
'url_list': 'UrlMatcher'},
'mention_list': ['handle1', 'handle2'],
'non_url_text': '@handle1 and @handle2 here are the #docs you requested',
'tag_list': ['docs'],
'text': '@handle1 and @handle2 here are the #docs you requested '
'https://github.com/kenjyco/input-helper/blob/master/README.md',
'url_details_list': [{'domain': 'github.com',
'filename_prefix': 'github.com--kenjyco--input-helper--blob--master--README.md',
'full_url': 'https://github.com/kenjyco/input-helper/blob/master/README.md',
'path': {'full_path': '/kenjyco/input-helper/blob/master/README.md',
'uri': '/kenjyco/input-helper/blob/master/README.md'},
'protocol': 'https'}],
'url_list': ['https://github.com/kenjyco/input-helper/blob/master/README.md']}
In [11]: ih.user_input_fancy()
input> go to https://github.com/kenjyco for a good time #learning stuff
Out[11]:
{'line_orig': 'go to https://github.com/kenjyco for a good time #learning stuff',
'non_url_text': 'go to for a good time #learning stuff',
'tag_list': ['learning'],
'url_list': ['https://github.com/kenjyco']}
FAQs
Helpers for parsing user input, generating menus, transforming data, making comparisons, flexible argument acceptance (string to list/set), regex matching, and more
We found that input-helper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.