Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Normalizes method names according to PEP8.

Project Description

Namalizer — smart method name normalizer

It allows you to keep PEP8 naming style, using libraries like `Twisted` or `unittest`.

Here is example:

import unittest
from namalizer import pep8

class MyTests(unittest.TestCase):
def set_up(self):
self.a = 'blah'

def test_example(self):
self.assert_equal(self.a, 'blah')

# or

if __name__ == '__main__':

Namalizer creates aliases for method with wrong names. In this case,
it will create aliazes in `unittest.TestCase` for methods like `setUp`,
`assertEqual`, etc..

Then, it will see that you created method `set_up` to override base class's
functionality and will create alias `setUp` for this method, this way
when `unittest` will call `setUp`, you version will be called.


If you use some library with ugly naming method, this regex will help you to
find all places where wrong names are used:

git grep -e '\(\.\|def \)[a-z]\+[A-Z]'


* Alexander Artemenko <<>> — original author.

Fork the project, contribute and send me patches.

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(2.6 kB) Copy SHA256 Hash SHA256
Source None Apr 4, 2011

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting