Freely use your coding style


License
MIT
Install
pip install nocase==1.1.2

Documentation

versionlicensestatus

NoCase

Freely use your coding style

NoCase automatically converts method calls from snake_case to camelCase and vice versa.

Installation

Using pip

pip install nocase

Manual installation

Download from https://github.com/Code-ReaQtor/NoCase/releases

python setup.py install

Example

Classes

from nocase import NoCase


class MyClass(NoCase):

    def myMethod(self):
        return 'my method'

    def my_other_method(self):
        return 'my other method'

my_class = MyClass()
print(my_class.my_method())  # prints 'my method'
print(my_class.myOtherMethod())  # prints 'my other method'

_main_

from nocase import registerNoCase


def myMethod():
    return 'my method'


def my_other_method():
    return 'my other method'

registerNoCase()  # find available methods in __main__ and registers converted names
print(my_method())  # prints 'my method'
print(myOtherMethod())  # prints 'my other method'

Modules

# my_module.py
def myMethod():
    return 'my method'


def my_other_method():
    return 'my other method'
from nocase import register_no_case
import my_module

register_no_case(my_module)  # find available methods in my_module and registers converted names
print(my_module.my_method())  # prints 'my method'
print(my_module.myOtherMethod())  # prints 'my other method'