A simple utility package for string and math functions
Project description
๐ง LogicTools
๐ง Overview
LogicTools is a Python package that provides utility functions for string and mathematical operations. It simplifies common tasks like text manipulation and basic calculations for developers.
โจ Features
๐ค String Utilities
- ๐ Convert strings to uppercase
- ๐ Reverse strings
- ๐ข Count characters in a string
โ Mathematical Utilities
- ๐งฎ Calculate factorials
- ๐ก๏ธ Perform division with proper error handling
๐ฆ Installation
Install LogicTools using pip:
pip install logictools
๐ Usage
๐ค String Utilities
from logictools import convert_to_uppercase, reverse_string, character_count
text = "Hello"
print(convert_to_uppercase(text)) # Output: HELLO
print(reverse_string(text)) # Output: olleH
print(character_count(text)) # Output: 5
โ Mathematical Utilities
from logictools import factorial, divide
# Factorial calculation
print(factorial(5)) # Output: 120
# Division with error handling
print(divide(10, 2)) # Output: 5.0
try:
print(divide(10, 0)) # Raises ZeroDivisionError
except ZeroDivisionError as e:
print(f"Error: {e}")
๐ Project Structure
logictools/
โโโ logictools/
โ โโ __init__.py
โ โโ math_utils.py # Math functions (factorial, divide)
โ โโ string_utils.py # String functions
โ
โโโ tests/ # Unit tests
โ โโ test_math_utils.py
โ โโ test_string_utils.py
โ
โโโ .github/ # GitHub Actions CI/CD
โ โโ workflows/
โ โโ python-package.yml
โ
โโโ .gitignore
โโโ pyproject.toml
โโโ README.md
โโโ LICENSE
โโโ requirements.txt
๐งช Development
โ Running Tests
poetry install --with dev
poetry run pytest
๐ ๏ธ Building the Package
python -m build
๐ Publishing
๐ฆ Create a GitHub release โ The CI/CD pipeline will automatically publish to PyPI
โ ๏ธ Error Handling
The divide function includes:
- โ Division by zero โ
ZeroDivisionError - ๐พ Invalid input types โ
TypeError
๐ License
This project is licensed under the MIT License. See the LICENSE file for details.
๐ค Contact
- Author: RANGDAL PAVANSAI
- ๐ง Email: psai49779@gmail.com
- ๐ GitHub: Pavansai20054
- ๐ผ LinkedIn: rangdal-pavansai
๐ Simplify your logic. One tool at a time โ LogicTools.
Project details
Release history Release notifications | RSS feed
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
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 logictools-0.1.12.tar.gz.
File metadata
- Download URL: logictools-0.1.12.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74a2612498acbc4058068c8cbe84647f16f8e50ad9f8f9dcdcc575d1330512ff
|
|
| MD5 |
b3e57de67da2c6d63f9b2c46d1e139f5
|
|
| BLAKE2b-256 |
f078cbc1b5a737ac3fc2aecaec20ad344bcbcfd99d5873f5b2c79268c87f04dc
|
File details
Details for the file logictools-0.1.12-py3-none-any.whl.
File metadata
- Download URL: logictools-0.1.12-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da3a3dd71255d50d15edc587dd3f8224c7c8fdd836bad6dcd2bf44c46b5ed66b
|
|
| MD5 |
898bfb4ae578f9e777ebc55facd8105c
|
|
| BLAKE2b-256 |
3f704755959ab7d0b0b1566652653fe3a619aed8774181164e5180ad0a831115
|