Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
yakh (Yet Another Keypress Handler) tries to handle keypresses from the stdin in the terminal in high-level platform indepdendent manner.
Yakh can be installed from PyPI using,
pip install python-yakh
or GitHub itself using poetry,
poetry add git+https://github.com/petereon/yakh.git
from yakh import get_key
from yakh.key import Keys
key = ''
while key not in ['q', Keys.ENTER]:
key = get_key()
if key.is_printable:
print(key)
yakh is dead-simple, there is only one function get_key()
which takes no arguments and blocks until a key is pressed.
For each keypress it creates an instance of Key
which holds:
.key
: characters representing the keypress.key_codes
: collection of Unicode code point encodings for all the characters (given by ord
function).is_printable
: printability of the characters in the keypressAdditionally Key
instances
Key
instances, str
instances and Unicode code point representations (tuples of integers).key
attributeyakh.key
submoduleyakh.key
sub-module contains platform dependent representations of certain keys under Keys
class. These are available namely for CTRL
key combinations and some other common keys.
FAQs
Yet Another Keypress Handler
We found that python-yakh 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.