A collection of tools, starting with a sloppy number parser.
Project description
kidexa
Stop writing Regex to clean numbers. Convert messy strings to numbers instantly.
🚀 The Problem
Every Python developer has faced this error when scraping data or processing user input:
ValueError: invalid literal for int() with base 10: '$ 1,200.00'
Cleaning these strings manually using regex is repetitive and error-prone.
💡 The Solution
kidexa is a lightweight utility that takes any messy string and converts it into a valid number (integer or float).
It automatically handles:
- Currency symbols
- Commas
- Extra words
- Social media suffixes (
k,m,b) - Random special characters
📦 Installation
pip install kidexa
🛠 Usage
from kidexa import sloppy_number
print(sloppy_number.parse("$ 1,200.00")) # Output: 1200
print(sloppy_number.parse("Rs. 450/-")) # Output: 450
print(sloppy_number.parse("2.5k views")) # Output: 2500
print(sloppy_number.parse("2M followers")) # Output: 2000000
print(sloppy_number.parse("Order #555")) # Output: 555
print(sloppy_number.parse("N/A")) # Output: None
✨ Features
- Currency Support
- Commas
- Multipliers (k, m, b)
- Smart Typing
- Safe (returns None if invalid)
📝 Use Cases
- Web Scraping
- Data Analysis
- Social Media Bots
- Backend Validation
🤝 Contributing
Pull requests are welcome!
📄 License
MIT License
- LICENSE file for details.
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
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 kidexa-0.1.3.tar.gz.
File metadata
- Download URL: kidexa-0.1.3.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f1db09c95a5660f4c8fa187a87f59933d4a8b8a6b46d6638bb058a7e79e2ea2
|
|
| MD5 |
d8775e9d0c6b4a6caff578a583ba1e2a
|
|
| BLAKE2b-256 |
40c43f705d064d43139b032feb5862c6d1fff4274868667f09ea50fc8bea7338
|
File details
Details for the file kidexa-0.1.3-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: kidexa-0.1.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 116.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
626e3cb08cc206438d25623ff3fd80a8d188a0ec89931bce9cdad58df8f264c6
|
|
| MD5 |
072d930d52e6369db874f0d4865a9c0f
|
|
| BLAKE2b-256 |
25d75856266d17c192f67ed808b288b86b7d3995fe8be25092019ebfdb138faf
|