python-camelcaser


Namepython-camelcaser JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/benschaedlich/python-camelcaser
SummaryConvert strings to camel, snake and kebab case - even if separation is unknown.
upload_time2023-06-25 12:08:43
maintainer
docs_urlNone
authorBenjamin Schaedlich
requires_python
license
keywords
VCS
bugtrack_url
requirements pyenchant
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python-CamelCaser

Python-CamelCaser is a Python package that provides functionality for finding real-world words in a string and reformatting strings into various standardized notations. It offers different modes to suit your specific formatting needs, including Camel case, Lower camel case, Snake case, Upper snake case, Kebab case, and Upper kebab case.

## Features

- Word Detection: The package includes a word detection mechanism that can identify real-world words within a given string.
- Notation Transformation: Python-CamelCaser allows you to easily transform strings into various standardized notations, such as Camel case, Lower camel case, Snake case, Upper snake case, Kebab case, and Upper kebab case.
- Flexibility: The package provides different modes to cater to a wide range of formatting requirements, allowing you to choose the notation style that best suits your project or coding style.


# Modes
| Mode               | Input                 | Output                |
|--------------------|-----------------------|-----------------------|
| camel_case         | verylongtestexample   | VeryLongTestExample   |
| lower_camel_case   | verylongtestexample   | veryLongTestExample   |
| snake_case         | verylongtestexample   | very_long_test_example |
| upper_snake_case   | verylongtestexample   | Very_Long_Test_Example |
| kebab_case         | verylongtestexample   | very-long-test-example |
| upper_kebab_case   | verylongtestexample   | Very-Long-Test-Example |



## Usage

### Import
```python
import camelcaser as cc
```

### Usage with real world words without separators
```python
input_word = "verylongtestexample"

# Camel case
camel_case = cc.make_camel_case(input_word)
print(f"Camel case: {camel_case}")

# Snake case
snake_case = cc.make_snake_case(input_word)
print(f"Snake case: {snake_case}")
```

### Usage with separators
```python
input_word =  "very_long_test_example"

# Camel Case
camel_case = cc.make_camel_case(input_word)

# Snake Case
snake_case = cc.make_snake_case(input_word)
```

### Usage with custom separator [;]
```python
input_word = "Very;Long;Test;Example"

# Camel Case
camel_case = cc.make_camel_case(input_word, separator=separator)

# Snake Case
snake_case = cc.make_snake_case(input_word, separator=separator)
```



## Examples

### Examples with real world words without separators
| Mode             | Input                  | Output                 |
|------------------|------------------------|------------------------|
| camel_case       | verylongtestexample     | VeryLongTestExample    |
| lower_camel_case | verylongtestexample     | veryLongTestExample    |
| snake_case       | verylongtestexample     | very_long_test_example |
| upper_snake_case | verylongtestexample     | Very_Long_Test_Example |
| kebab_case       | verylongtestexample     | very-long-test-example |
| upper_kebab_case | verylongtestexample     | Very-Long-Test-Example |


### Examples with separators
| Mode             | Input                  | Output                 |
|------------------|------------------------|------------------------|
| camel_case       | very_long_test_example | VeryLongTestExample    |
| lower_camel_case | very_long_test_example | veryLongTestExample    |
| lower_snake_case | very_long_test_example | very_long_test_example |
| upper_snake_case | very_long_test_example | Very_Long_Test_Example |
| kebab_case       | very_long_test_example | very-long-test-example |
| upper_kebab_case | very_long_test_example | Very-Long-Test-Example |
| camel_case       | very-long-test-example  | VeryLongTestExample    |
| lower_camel_case | very-long-test-example  | veryLongTestExample    |
| lower_snake_case | very-long-test-example  | very_long_test_example |
| upper_snake_case | very-long-test-example  | Very_Long_Test_Example |
| kebab_case       | very-long-test-example  | very-long-test-example |
| upper_kebab_case | very-long-test-example  | Very-Long-Test-Example |
| camel_case       | VeryLongTestExample     | Verylongtestexample    |
| lower_camel_case | VeryLongTestExample     | verylongtestexample    |
| lower_snake_case | VeryLongTestExample     | Verylongtestexample    |
| upper_snake_case | VeryLongTestExample     | Verylongtestexample    |
| kebab_case       | VeryLongTestExample     | Verylongtestexample    |
| upper_kebab_case | VeryLongTestExample     | Verylongtestexample    |
| camel_case       | veryLongTestExample     | Verylongtestexample    |
| lower_camel_case | veryLongTestExample     | verylongtestexample    |
| lower_snake_case | veryLongTestExample     | Verylongtestexample    |
| upper_snake_case | veryLongTestExample     | Verylongtestexample    |
| kebab_case       | veryLongTestExample     | Verylongtestexample    |
| upper_kebab_case | veryLongTestExample     | Verylongtestexample    |


### Examples with custom separator [;]
| Mode             | Input                  | Output                 |
|------------------|------------------------|------------------------|
| camel_case       | very;long;test;example | VeryLongTestExample    |
| lower_camel_case | very;long;test;example | veryLongTestExample    |
| lower_snake_case | very;long;test;example | very_long_test_example |
| upper_snake_case | very;long;test;example | Very_Long_Test_Example |
| kebab_case       | very;long;test;example | very-long-test-example |
| upper_kebab_case | very;long;test;example | Very-Long-Test-Example |
| camel_case       | Very;Long;Test;Example | VeryLongTestExample    |
| lower_camel_case | Very;Long;Test;Example | veryLongTestExample   



# Thank you

https://github.com/dwyl/english-words





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/benschaedlich/python-camelcaser",
    "name": "python-camelcaser",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Benjamin Schaedlich",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "# Python-CamelCaser\n\nPython-CamelCaser is a Python package that provides functionality for finding real-world words in a string and reformatting strings into various standardized notations. It offers different modes to suit your specific formatting needs, including Camel case, Lower camel case, Snake case, Upper snake case, Kebab case, and Upper kebab case.\n\n## Features\n\n- Word Detection: The package includes a word detection mechanism that can identify real-world words within a given string.\n- Notation Transformation: Python-CamelCaser allows you to easily transform strings into various standardized notations, such as Camel case, Lower camel case, Snake case, Upper snake case, Kebab case, and Upper kebab case.\n- Flexibility: The package provides different modes to cater to a wide range of formatting requirements, allowing you to choose the notation style that best suits your project or coding style.\n\n\n# Modes\n| Mode               | Input                 | Output                |\n|--------------------|-----------------------|-----------------------|\n| camel_case         | verylongtestexample   | VeryLongTestExample   |\n| lower_camel_case   | verylongtestexample   | veryLongTestExample   |\n| snake_case         | verylongtestexample   | very_long_test_example |\n| upper_snake_case   | verylongtestexample   | Very_Long_Test_Example |\n| kebab_case         | verylongtestexample   | very-long-test-example |\n| upper_kebab_case   | verylongtestexample   | Very-Long-Test-Example |\n\n\n\n## Usage\n\n### Import\n```python\nimport camelcaser as cc\n```\n\n### Usage with real world words without separators\n```python\ninput_word = \"verylongtestexample\"\n\n# Camel case\ncamel_case = cc.make_camel_case(input_word)\nprint(f\"Camel case: {camel_case}\")\n\n# Snake case\nsnake_case = cc.make_snake_case(input_word)\nprint(f\"Snake case: {snake_case}\")\n```\n\n### Usage with separators\n```python\ninput_word =  \"very_long_test_example\"\n\n# Camel Case\ncamel_case = cc.make_camel_case(input_word)\n\n# Snake Case\nsnake_case = cc.make_snake_case(input_word)\n```\n\n### Usage with custom separator [;]\n```python\ninput_word = \"Very;Long;Test;Example\"\n\n# Camel Case\ncamel_case = cc.make_camel_case(input_word, separator=separator)\n\n# Snake Case\nsnake_case = cc.make_snake_case(input_word, separator=separator)\n```\n\n\n\n## Examples\n\n### Examples with real world words without separators\n| Mode             | Input                  | Output                 |\n|------------------|------------------------|------------------------|\n| camel_case       | verylongtestexample     | VeryLongTestExample    |\n| lower_camel_case | verylongtestexample     | veryLongTestExample    |\n| snake_case       | verylongtestexample     | very_long_test_example |\n| upper_snake_case | verylongtestexample     | Very_Long_Test_Example |\n| kebab_case       | verylongtestexample     | very-long-test-example |\n| upper_kebab_case | verylongtestexample     | Very-Long-Test-Example |\n\n\n### Examples with separators\n| Mode             | Input                  | Output                 |\n|------------------|------------------------|------------------------|\n| camel_case       | very_long_test_example | VeryLongTestExample    |\n| lower_camel_case | very_long_test_example | veryLongTestExample    |\n| lower_snake_case | very_long_test_example | very_long_test_example |\n| upper_snake_case | very_long_test_example | Very_Long_Test_Example |\n| kebab_case       | very_long_test_example | very-long-test-example |\n| upper_kebab_case | very_long_test_example | Very-Long-Test-Example |\n| camel_case       | very-long-test-example  | VeryLongTestExample    |\n| lower_camel_case | very-long-test-example  | veryLongTestExample    |\n| lower_snake_case | very-long-test-example  | very_long_test_example |\n| upper_snake_case | very-long-test-example  | Very_Long_Test_Example |\n| kebab_case       | very-long-test-example  | very-long-test-example |\n| upper_kebab_case | very-long-test-example  | Very-Long-Test-Example |\n| camel_case       | VeryLongTestExample     | Verylongtestexample    |\n| lower_camel_case | VeryLongTestExample     | verylongtestexample    |\n| lower_snake_case | VeryLongTestExample     | Verylongtestexample    |\n| upper_snake_case | VeryLongTestExample     | Verylongtestexample    |\n| kebab_case       | VeryLongTestExample     | Verylongtestexample    |\n| upper_kebab_case | VeryLongTestExample     | Verylongtestexample    |\n| camel_case       | veryLongTestExample     | Verylongtestexample    |\n| lower_camel_case | veryLongTestExample     | verylongtestexample    |\n| lower_snake_case | veryLongTestExample     | Verylongtestexample    |\n| upper_snake_case | veryLongTestExample     | Verylongtestexample    |\n| kebab_case       | veryLongTestExample     | Verylongtestexample    |\n| upper_kebab_case | veryLongTestExample     | Verylongtestexample    |\n\n\n### Examples with custom separator [;]\n| Mode             | Input                  | Output                 |\n|------------------|------------------------|------------------------|\n| camel_case       | very;long;test;example | VeryLongTestExample    |\n| lower_camel_case | very;long;test;example | veryLongTestExample    |\n| lower_snake_case | very;long;test;example | very_long_test_example |\n| upper_snake_case | very;long;test;example | Very_Long_Test_Example |\n| kebab_case       | very;long;test;example | very-long-test-example |\n| upper_kebab_case | very;long;test;example | Very-Long-Test-Example |\n| camel_case       | Very;Long;Test;Example | VeryLongTestExample    |\n| lower_camel_case | Very;Long;Test;Example | veryLongTestExample   \n\n\n\n# Thank you\n\nhttps://github.com/dwyl/english-words\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Convert strings to camel, snake and kebab case - even if separation is unknown.",
    "version": "1.0.2",
    "project_urls": {
        "Documentation": "https://github.com/benschaedlich/python-camelcaser",
        "Homepage": "https://github.com/benschaedlich/python-camelcaser",
        "Source": "https://github.com/benschaedlich/python-camelcaser"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b4c7f185a1bb585a4e21735f744ada5f70a8882f570e0433f79035088ec8a898",
                "md5": "789e97ef063c7bfffc10ae33a28c9d33",
                "sha256": "fbf0cd53a34bf15ff8ec53d04ce90e5e626857c3720e948f76651d5b5a6663dd"
            },
            "downloads": -1,
            "filename": "python_camelcaser-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "789e97ef063c7bfffc10ae33a28c9d33",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1089575,
            "upload_time": "2023-06-25T12:08:43",
            "upload_time_iso_8601": "2023-06-25T12:08:43.141938Z",
            "url": "https://files.pythonhosted.org/packages/b4/c7/f185a1bb585a4e21735f744ada5f70a8882f570e0433f79035088ec8a898/python_camelcaser-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-25 12:08:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "benschaedlich",
    "github_project": "python-camelcaser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pyenchant",
            "specs": [
                [
                    "==",
                    "3.2.2"
                ]
            ]
        }
    ],
    "lcname": "python-camelcaser"
}
        
Elapsed time: 7.22007s