Update keys.py

added license and docstrings