pycasestyle

A simple python lib to convert string and dict keys to camelcase, pascal case, kebab case and snake case.


Keywords
pycasestyle, camelcase, snakecase, pascal, case, kebab, dict, key, string, conversor, easily, kebab-case, parser, pascalcase, python
License
Apache-2.0
Install
pip install pycasestyle==0.1.4

Documentation

pycasestyle

pycasestyle is a Python library for converting variable naming styles between CamelCase, snake_case, kebab-case, and PascalCase.

Supported styles:
  • CamelCase
  • SnakeCase
  • KebabCase
  • PascalCase

Installation

To install pycasestyle, you can use pip:

Usage

You can import the text formatting styles directly from the pycasestyle module and use them in your code. Here's an example of how to use the text formatting styles:

Use cases

If you needed convert schemas, mappings, contracts, etc. This tool is specific to turn easily your job.

Real use case:

You need to migrate information from Postgres to Elasticsearch, however, the mapping used in Elastic is following the camelcase pattern, whereas in Postgres it is with the Snakecase pattern, see how simple it is to solve:

Contributing

If you encounter any issues or have suggestions for improvement, feel free to open an issue or submit a pull request on the GitHub repository <https://github.com/preduus/pycasestyle>.

License

This project is licensed under the Apache License 2.0 License. See the LICENSE <https://github.com/preduus/pycasestyle/LICENSE> file for more details.