> `utilbox` is a collection of Python utility packages to help you save time and avoid writing code for commonly
required tasks.
The current set of utilities cover the following areas:
* Encryption
* JSON manipulation
* Sending Email
* Number manipulations
* File, directory manipulations
* System interaction
* Spreadsheet (Excel, CSV) manipulation
* String and multi-line text manipulation
An overview of the available packages is tabulated as below.
Package | Class | Description
--- | --- | ---
crypt_utils | CryptUtils | Encrypt data with AES-128/192/256-bit encryption
json_utils | JsonUtils | Convert data to `JSON` formatted string
mail_utils | MailUtils | Send a plain-text or HTML-formatted email using Python `smtplib` or external mail application (CLI)
number_utils | NumberUtils | Perform various operations with numbers and numeric lists
os_utils | SysUtils, FileUtils, DirUtils | Manipulate files, directories and interact with the underlying OS
spreadsheet_utils | ExcelUtils, CsvUtils | Work with spreadsheets and CSV files
string_utils | StringUtils, TextUtils | Manipulate strings and multi-line text
## Installation
### Install using `pip`
Make sure you have `pip` installed on your system, and then run:
```pip install utilbox```
### Install from sources
* Download the [latest release] from `GitHub` and extract it to a temporary location
* Open your terminal and `cd` to the extracted archive directory
* Run `python setup.py install`
### Dependencies
Package dependencies are listed in `requirements.txt`.
## Usage
The below rule should be applied in general when trying to use a utility class,
> from utilbox.*<package_name>* import *<class_name>*
For example to use the `FileUtils` class from `os_utils` package,
> from utilbox.*os_utils* import *FileUtils*
Here are some real-world scenarios where `utilbox` can serve your purposes,
### Example 1
Let's say you want to fetch only the last line of some text file. To do this,
```python
from utilbox.os_utils import FileUtils
last_line = FileUtils.get_file_last_line("path/to/file.ext")
print last_line
```
### Example 2
What if you wanted the epoch time? No worries,
```python
from utilbox.os_utils import SysUtils
epoch_time = SysUtils.get_epoch_time()
print epoch_time
```
### Example 3
You can send an email just as easily,
```python
from utilbox.mail_utils import MailUtils
smtp_server = "192.168.0.1"
sender_email_id = "someguy@example.com"
mailer = MailUtils(smtp_server, sender_email_id)
# send a plain-text message
mailer.send_mail_plain("receiver@example2.com", "This is a test mail", sender_email_id, "This message was brought to you by 'utilbox'!")
# send an HTML message
mailer.send_mail_plain("receiver@example2.com", "This is a test mail", sender_email_id, "This message was brought to you by <b>'utilbox'<b>!")
```
`utilbox` is being updated constantly, so feel free to send in any suggestions for new features or issues with existing ones. Enjoy!
## Release history
Release history is available in `CHANGELOG.md`.
## License
See `LICENSE.txt` for license information.
## Author
[Jenson Jose]
Follow me [@JoseJenson]
Send your suggestions / feedback at `jensonjose@live.in`
### How to contribute
To contribute, simply:
* Fork the project
* Create your feature branch
* Commit your changes
* Push committed changes to your branch
* If you're happy and you know it, create a new `PULL` request
[latest release]: https://github.com/jensonjose/utilbox/releases/latest
[Jenson Jose]: https://www.jensonjose.com
[@JoseJenson]: https://twitter.com/JoseJenson
Metadata
Release files for utilbox 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| utilbox-0.1.6.tar.gz | 17.5 kB | Without provenance | Details for utilbox-0.1.6.tar.gz |
Release files / utilbox-0.1.6.tar.gz
| Download URL | utilbox-0.1.6.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8288a400da29814c94237d7e21099797611d0dda466b702bbbfbc5aa70e8a3c
|
|
BLAKE2b-256 checksum How to use checksums |
6b40db2824c8a86481d16334a41715dfaaad0a452360bae8373395870de48e51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for utilbox 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.