realkey is a Python project designed to generate keys and other locksport tools. It is available as an interactive browser application and as a Python library built on build123d.
- Generate blank or cut keys.
- Generate plug followers using a library of possible follower ends.
- The browser application shows a preview of the generated model.
- Models can be downloaded as STL or STEP files directly.
- Share generated keys and followers with others via generatable links.
- Generation is handled entirely within the browser, no heavy server is required.
realkey is built on Python 3.14. To install the current checkout:
python -m pip install .Key implementations return build123d Part objects:
from realkey.keys.paclock import PR1
blank = PR1.blank("pr1", "pr1")
cut_key = PR1.key("pro", "pr1", "6212121")The conceptual idea behind the key taxonomy is as follows:
- A singular key is defined by a bitting, keyway, profile, and type.
- Bitting is a unique code that links a key to a lock, typically a numeric code specifying the cuts to be made. E.g. "145762"
- Keyway defines the shape of the portion of the key that enters the lock. Some locks may come with a variety of different keyways. E.g. C
- Profile defines the shape of the entire key from a profile view. This commonly is different between different pin count versions of the same lock type. E.g. 6-pin
- Type defines the specific lock or lock family that the key works for. E.g. Schlage Classic
Several projects inspired realkey: