Custom utility functions to reuse efficiently.
Project description
Utility Functions Repository
Overview
- A collection of reusable utility functions for various tasks, including file operations and progress tracking.
- View author details here
Installation
To install the utility functions, run:
pip install git+https://github.com/vatsal1306/vatsal.git
or, you can directly install from pip.
pip install vatsal
Usage
File operations
Import utils.File class and use its methods for file operations.
from vatsal.utils import File
# Initialize a File object
file = File('/path/to/file.txt')
# Read file content
content = file.read()
# Write to file
file.write('Hello, world!')
# Append to file
file.append('Appended text')
# Print file information
print(file)
Progress tracking
Use the ProgressPercentage class for real time file upload data in bytes.
from vatsal.utils import ProgressPercentage
import boto3
# Initialize a ProgressPercentage object
progress = ProgressPercentage('file.txt')
# Upload file to S3 with progress tracking
s3 = boto3.client('s3')
s3.upload_file('file.txt', 'bucket-name', 'object-name', Callback=progress)
Contributing
Contributions are welcome. To contribute:
- Fork the repository.
- Create a new branch.
- Make changes and commit.
- Submit a pull request.
Authors
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
vatsal-1.0.8.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vatsal-1.0.8.tar.gz.
File metadata
- Download URL: vatsal-1.0.8.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48d69a91cc677bc8c5d68d06ac169887a01abff0421c2294fcc911ac0c5704b2
|
|
| MD5 |
59e60314e9fa7ea81163f2c43031abdf
|
|
| BLAKE2b-256 |
c5108cc0ebe51b325fb96512c96175aeba4fec41e4c235ca6773f40916d4cfc4
|
File details
Details for the file vatsal-1.0.8-py3-none-any.whl.
File metadata
- Download URL: vatsal-1.0.8-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9efdb8190ac15cd15020e84f6b90086a8fac07b60642d7e231e9c8a93d7ce7de
|
|
| MD5 |
5072f661bdd8231514d1688ed5713125
|
|
| BLAKE2b-256 |
e291e5b067d5b2434ecc5fc4e7893ac732940dfe8a919e12e28875076bbda9a8
|