Swiss Army Knife of Python
So, I've been working as a Python Ninja for 3 years now. I've been exposed to multiple projects and I've been noticing myself using some of the code over and over on some of the projects. And I've been copy/pasting things until I said enough, lets create a package! Because that is the essence of good code writing practice!
- KISS - Keep It Simple, Stupid!!!
- DRY - Do not Repeat Yourself!!!
We know those all too well... Anyway, this package includes mostly functions that I've been using all over the place. I'm pretty sure you can find tremendous value out of this if you take time to go over the package content.
To be honest, a lot of those have been taking directly from Stack Overflow and slightly modified and placed in the nicer wrapper. That is it. It has been open source before this package, now it is open source in one convenient place.
This package contains modules providing following functionality (ordered in alphabetical order using module names):
AES Functions
Serial(COM) Port Functions
Database Classes
Decorator Classes
File System Functions
- File Manipulation Functions
- Directory Manipulation Functions
- File/Folder Memory Space/Size Functions
- Open/Write/Read File Functions
- Time Stamp Functions
Logger
OrderedDict Class
Python Distribution Install Functions
Python Distribution Package Utilities
Pickle/Unpickle Functions
Current Platform Detection
Web Upload Functions
Zip Archive Functions
Note
Each module has to be explicitly included.
Basically, you've got 2 options. Either download latest code from Github and execute:
python setup.py install
Alternatively, install package using pip:
pip install py_knife
During installation, py_knife
module will be added to your python site-packages.
The py_knife
package comes with some documentation. It is mostly self generated from the code itself.
There are also images giving basic overview as far as package modules and classes. Please let me know, if you end up
digging through code and willing to extend documentation.
Following link, parses html pages directly from GitHub. Pretty neat stuff! http://rawgit.com/Barmaley13/SwissArmyKnife/master/docs/index.html
Shoot me email at kirill at kbelyayev.com
if you have any questions, suggestions, improvements, additions and etc.
I would love to help you get this script going/help you with your project, just hire me as a contractor.
I might help you free of charge if you contribute to this distribution or ask politely. Beer donations are welcome too!
Good luck! Happy coding! Now you've got your own Swiss Army Knife of Python!