{"id":46546,"library":"strict-kwargs","title":"strict-kwargs","description":"A Python library for enforcing keyword-only arguments in function signatures. Version 2026.6.4 requires Python 3.11+. It provides a decorator that forces all arguments after a certain point to be passed as keyword arguments, reducing bugs from positional argument misuse. No breaking changes have been reported recently.","status":"active","version":"2026.6.4","language":"python","source_language":"en","source_url":"https://github.com/adamtheturtle/strict-kwargs","tags":["decorator","keyword-arguments","enforcement"],"install":[{"cmd":"pip install strict-kwargs","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from strict_kwargs import strict_kwargs","symbol":"strict_kwargs","correct":"from strict_kwargs import strict_kwargs"}],"quickstart":{"code":"from strict_kwargs import strict_kwargs\n\n@strict_kwargs\ndef greet(name, greeting):\n    return f\"{greeting}, {name}!\"\n\n# Correct call\nprint(greet(name=\"Alice\", greeting=\"Hello\"))\n# Wrong call (will raise TypeError)\n# print(greet(\"Alice\", \"Hello\"))","lang":"python","description":"Decorate a function with @strict_kwargs to require all arguments to be passed as keyword arguments."},"warnings":[{"fix":"Always use keyword arguments when calling a decorated function.","message":"The decorator enforces keyword-only arguments; any positional usage raises TypeError in all known versions.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"self or cls can still be passed positionally; all other arguments become keyword-only.","message":"Applying @strict_kwargs to a class method will not affect self or cls; they are handled separately.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use the decorator only to enforce keyword usage for other parameters.","message":"If you decorate a function with **kwargs, the decorator does not affect those; they are already keyword-only by Python syntax.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'2026.6.4':17 '3.11':20 'argument':12,28,38,43,55 'break':46 'bug':40 'certain':31 'chang':47 'decor':24,52 'enforc':8,56 'forc':26 'function':14 'keyword':10,37,54 'keyword-argu':53 'keyword-on':9 'kwarg':3 'librari':6 'misus':44 'pass':35 'point':32 'posit':42 'provid':22 'python':5,19 'recent':51 'reduc':39 'report':50 'requir':18 'signatur':15 'strict':2 'strict-kwarg':1 'version':16","created_at":"2026-06-07T13:00:27.081234+00:00","updated_at":"2026-06-07T13:00:27.081234+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'strict_kwargs'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/adamtheturtle/strict-kwargs","github":"https://github.com/adamtheturtle/strict-kwargs","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}