Skip to main content

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

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

kidexa-0.1.4.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kidexa-0.1.4-cp311-cp311-win_amd64.whl (116.7 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file kidexa-0.1.4.tar.gz.

File metadata

  • Download URL: kidexa-0.1.4.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for kidexa-0.1.4.tar.gz
Algorithm Hash digest
SHA256 07c7546de849fd370d18a2110fb7067df60f7c11f8bd7916bd03f814da0e04c6
MD5 8f79157f1d248db075655906964fb38f
BLAKE2b-256 3d2a4c11b8cf33699e35f78cc0e2c51f536f15b927fc27c7f23711fbace656d8

See more details on using hashes here.

File details

Details for the file kidexa-0.1.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: kidexa-0.1.4-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

Hashes for kidexa-0.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6899a7255d1fd8dbe90f6f10a4c181a770b9f466ffc35b195512ddedc626f53f
MD5 28687ecf24d53d6cc45a7708d7d522e5
BLAKE2b-256 924babc9c15566160d3ac70871df5a8305e8fbebe5c8f9826f30dcb8bf43be88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page