$30 off During Our Annual Pro Sale. View Details »

Python Tooling

Python Tooling

Going through some useful tools that make every-day Python developer easier

Senko Rašić

June 12, 2014
Tweet

More Decks by Senko Rašić

Other Decks in Programming

Transcript

  1. Python Tooling
    Senko Rašić, Dobar Kod

    View Slide

  2. HTTP Server
    python -m SimpleHTTPServer 8000

    View Slide

  3. JSON validator

    View Slide

  4. Benchmarking
    python -m test.pystone
    Caveat: single-core

    View Slide

  5. Virtual environment
    pip
    !
    virtualenv
    !
    virtualenvwrapper

    View Slide

  6. View Slide

  7. Linters & style checkers
    PEP8 - Style guide for Python code (YMMV)
    !
    pep8
    !
    pylint
    !
    pyflakes
    !
    flake8

    View Slide

  8. View Slide

  9. Test coverage
    coverage.py
    !
    !
    Rules of thumb:
    !
    1. higher is usually better
    2. test only your code
    3. test complex things

    View Slide

  10. View Slide

  11. Docs
    pip install sphinx
    !
    sphinx-quickstart
    !
    make -C doc html
    !
    open doc/_build/html

    View Slide

  12. My Awesome Module
    =================
    !
    This is a documentation for my
    Python module of pure awesomeness.
    !
    API Reference
    =============
    !
    .. automodule:: mymodule
    :members:
    doc/index.rst:

    View Slide

  13. Better Python shell

    View Slide

  14. View Slide

  15. Code editor / IDE
    VIM, Emacs, Sublime, PyCharm, Wing, Komodo, …
    !
    Customize!

    View Slide

  16. That’s all, folks!
    ?

    View Slide