Python useful classes for office work automation
Project description
Coffeece
Python useful classes for office work automation. Currently working on Python 3.
Install
You can install this package using pip:
pip install coffeece
Popup
Tkinter popup functions to:
- show_info(title, message) -> shows a popup with the title and message provided.
- ask_file() -> popup asks for a file through file explorer. Returns path as string.
- ask_directory() -> popup asks for a directory through file explorer. Returns path as string.
- ask_yes_no(title, message) -> shows a popup with the title and message provided and ask yes-no. If yes returns 'True'.
SQLiteDB
A class to manage SQLite3 databases. Now it could:
- create_connection(self) -> Connect with sqlite3 DB (create it if there isn't). Returns conection object.
- create_cursor(self) -> Create cursor to communicate with DB. Returns cursor.
- create_table(cursor, table_name, table_columns) -> Create a table with the name (string) columns and column types (dictionary) given by the user.
- insert_row(cursor, table_name, row_items) -> Inserts row into DB with the cursor (cursor), table name (string), and items (list) given by the user.
- commit_changes(self) -> Save DB changes.
- close_connection(self) -> Close connection to DB.
- export_table_to_excel(self, table_name) -> Exports table to excel using
Pandas
library.
Third party dependencies:
- Pandas
SysWalker
System navigation and recursion functions:
- list_all_files(src_directory) -> Make a list of all the files in the given directory. Returns list.
- list_all_files_recursively(src_directory) -> Make a dictionary of all the files in the given directory recursively. Returns dictionary = root: { dirs: {} , files: {} }
- list_files_by_type(src_directory, file_extension) -> Make a list of all the files with the given file extension in the given directory. Returns list.
Why Coffeece?
The main reason behind this little classes is that a huge part of the mechanical work at a job office can be automated through this kind of objects. The other reason to use this is to make office scripts cleaner with an — even more — simplified dependency management.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file coffeece-0.2.1.tar.gz
.
File metadata
- Download URL: coffeece-0.2.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e547ea00e7604738546bf37683791bb618d173d0f57ad09aa29bacbf7c221c8 |
|
MD5 | 9a2201e67732a8371a1cf7b345da7105 |
|
BLAKE2b-256 | df5d51c3001c4bfc6f22e1f813fed4404e6a8e05c08d6cf59a8c8d6ea6019f67 |
File details
Details for the file coffeece-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: coffeece-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7ca438be7d99dc96c991813c53fbc8b9e6ca796e4ea1468455d53e65d716a91 |
|
MD5 | 994d1b16b8e1d574319177452c7fb0ba |
|
BLAKE2b-256 | ff33a6abca5a5ee8e1b1f9c77a46ea40c14e1bfaf11ace951dadaa73b861cf7a |