Awesome Python modules as script

Catalogue of useful python modules that run as script.

Requirements:

  • Python 3

How to use?

You have to type: python -m <name>.

You can access help through: python -m <name> --help ou python -m <name> -h.

Standard Library

Name Description Example
antigravity Open browser with http://xkcd.com/353 python -m antigravity
base64 Encode and decode base64 echo 'message' | python -m base64 -e
cProfile Profiling your code python -m cProfile module.py
calendar Pretty print a calendar python -m calendar
code Closely emulate the interactive Python interpreter python -m code
compileall Compile Python source files in a directory tree python -m compileall
dis Print bytecode generated by a file python -m dis some_module.py
doctest Run doctests in a file python -m doctest myfile.py
encodings.rot_13 ROT-13 encoder/decoder echo 'message' | python -m encodings.rot_13
filecmp Compare two directories content python -m filecmp dir_a dir_b
ftplib Simple ftp client python -m ftplib [host]
gzip Compress and decompress files python -m gzip [file]
http.server Simple HTTP Server python -m http.server 5000
inspect Inspect a object. python -m inspect "collections:OrderedDict"
json.tool Validate and pretty-print JSON echo '{ 1.2:3.4}' | python -m json.tool
mimetypes MIME type/extension database python -m mimetypes -e application/json
pdb Automatic post-mortem debugging python -m pdb myscript.py
pip Python package manager python -m pip install --user requests
platform Show current platform python -m platform
poplib List POP3 mailbox python -m poplib [server] [username] [password]
profile Profiling your code python -m profile some_module.py
pstats Print profiling statistics python -m pstats [file generated by profile]
pyclbr Extract classes and methods from a module python -m pyclbr [module]
pydoc Consult the documentation python -m pydoc -b
quopri Encode and decode MIME quoted-printable data echo 'message' | python -m quopri
site List your current path python -m site
smtplib Send a mail message(to localhost) python -m smtplib
telnetlib Telnet client python -m telnetlib towel.blinkenlights.nl
this Zen of python python -m this
timeit Measuring execution time of small code snippets python -m timeit 'sorted(range(100))'
tokenize Show how python tokenize a file python -m tokenize some_module.py
unittest Run tests using unittest python -m unittest .
uu Encode and decode uuencode files echo 'message' | python -m uu
venv Create a virtual enviroment python -m venv myproject
webbrowser Open a web browser python -m webbrowser http://httpbin.org
zipfile Zip operations like create, test or extract python -m zipfile -e zipfile.zip target

Third party packages

Name Description Example
pytest Run tests using pytest python -m pytest -s tests/

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Awesome Python Modules As Script

:neckbeard: Catalogue of useful python modules that run as script.

Awesome Python Modules As Script Info

⭐ Stars 40
🔗 Source Code github.com
🕒 Last Update a year ago
🕒 Created 5 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author cassiobotaro