Skip to main content

TOPyN: Typed Opinionated PYthon Normalizer

Project description

TOPyN: Typed Opinionated PYthon Normalizer


The problem is that these rules depend on a set of packages and config files, and every time we change our mind about one rule, or add new ones, we need to update multiple projects. Topyn solves this by providing in one single place all the tools and configurations we use in our projects.

All the configurations are part of the project (topyn/configs) and is not the purpose of this project to make them flexible, if you need that please check the packages that we use, and run them with your configuration.


pip install topyn

Command line

There are two possible arguments:

  • path is the path that you want to check, if it is empty it defaults to the current directory.
  • --fix if you use this flag topyn will try to fix the code for you


Check the code inside directory_with_code : topyn directory_with_code

Check the code inside current directory : topyn

Check the code inside current directory and try to fix it: topyn --fix

topyn --help output

Typed Opinionated PYthon Normalizer

positional arguments:
  path        path to topynize (default: .)

optional arguments:
  -h, --help  show this help message and exit
  --fix       try to fix my code (default: False)
  --version   show program's version number and exit

topyn output

➡️ Checking formatting ...
All done! ✨ 🍰 ✨
8 files would be left unchanged.
➡️ Checking rules ...
➡️ Checking types ...
✅ Everything is OK! 😎"


➡️ Checking formatting ...
All done! ✨ 🍰 ✨
1 file would be left unchanged.
➡️ Checking rules ...
➡️ Checking types ...
tests/resources/wrong_types/ error: Incompatible return value type (got "int", expected "str")
Found 1 error in 1 file (checked 1 source file)

🔴 Sadly, types failed 😢

Tools included


flake8 is a command-line utility for enforcing style consistency across Python projects

Flake8 plugins

  • flake8-bugbear

    A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.
  • flake8-print

    Check for print statements in python files.
  • flake8-comprehensions

    A flake8 plugin that helps you write better list/set/dict comprehensions.
  • pep8-naming

    Naming Convention checker for Python (PEP 8)


The Uncompromising Code Formatter


Optional static typing for Python (PEP 484)


Leandro Leites Barrios : Main developer

Denada Korita : UX & Documentation consultant

* scooter icon source: icons8

Project details

Download files

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

Files for topyn, version 0.6.0
Filename, size File type Python version Upload date Hashes
Filename, size topyn-0.6.0-py3-none-any.whl (8.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size topyn-0.6.0.tar.gz (8.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page