{"id":8486,"library":"pyheck","title":"pyheck","description":"pyheck is a Python library that provides efficient case conversion functionalities, acting as a thin wrapper around the high-performance Rust library `heck`. It supports various case conversions like snake_case, camelCase, kebab-case, and their uppercase variants. Intended to be unicode-aware, consistent, and fast, it claims 5-10x performance benefits over Python's `inflection` library for similar tasks. The current version is 0.1.5, released on February 18, 2022, indicating an infrequent release cadence since its initial development.","status":"maintenance","version":"0.1.5","language":"en","source_language":"en","source_url":"https://github.com/kevinheavey/pyheck","tags":["string-manipulation","case-conversion","rust-bindings","utilities","performance"],"install":[{"cmd":"pip install pyheck","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Runtime dependency","package":"python","version":">=3.7","optional":false}],"imports":[{"symbol":"kebab","correct":"from pyheck import kebab"},{"symbol":"snake","correct":"from pyheck import snake"},{"symbol":"lower_camel","correct":"from pyheck import lower_camel"},{"note":"Functions are directly available from the top-level package, not submodules.","wrong":"import pyheck.kebab_many","symbol":"kebab_many","correct":"from pyheck import kebab_many"}],"quickstart":{"code":"from pyheck import snake, upper_camel, kebab\n\ntext1 = \"Hello world from pyheck\"\ntext2 = \"another string input\"\n\n# Convert to snake_case\nsnake_case_text = snake(text1)\nprint(f\"Snake case: {snake_case_text}\")\n\n# Convert to UpperCamelCase\ncamel_case_text = upper_camel(text1)\nprint(f\"Upper Camel case: {camel_case_text}\")\n\n# Convert a list of strings to kebab-case efficiently\ntexts_to_convert = [text1, text2]\nkebab_case_list = kebab_many(texts_to_convert)\nprint(f\"Kebab case list: {kebab_case_list}\")","lang":"python","description":"Demonstrates importing individual case conversion functions and converting a single string, as well as using a `_many` function for a list of strings."},"warnings":[{"fix":"Consult `pyheck`'s documentation for specific function behavior and test critical edge cases during migration.","message":"When migrating from `inflection` or similar libraries, be aware that `pyheck`'s functions may not have a 1:1 overlap or identical behavior with other libraries. Always verify edge cases.","severity":"gotcha","affected_versions":"All"},{"fix":"Use `from pyheck import function_many` and pass a list of strings for bulk conversions to maximize performance.","message":"For converting sequences of strings, prefer the `_many` counterparts (e.g., `snake_many`, `kebab_many`). These functions leverage Rust's parallel features for significantly higher performance on lists.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the specific function is imported: `from pyheck import snake`.","cause":"Attempting to use a conversion function (e.g., `snake`) without importing it from the `pyheck` package.","error":"NameError: name 'snake' is not defined"},{"fix":"Import and use the specific conversion function, like `from pyheck import snake; snake('some text')`.","cause":"Attempting to call the `pyheck` module directly as a function (e.g., `pyheck('some_text')`) instead of calling one of its conversion functions.","error":"TypeError: 'module' object is not callable"}]}