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.2.tar.gz (3.2 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.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kidexa-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for kidexa-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ec682a88d3741b9a7e6189008956e66e06941d39296dea61c79126a9d62c21ec
MD5 e490779ad59268faa803a8bb9aa5a19c
BLAKE2b-256 9029d10a68cd33cf29484f9eb8abe8c8eef0581df2186c80dd36b5e85c4ca5ce

See more details on using hashes here.

File details

Details for the file kidexa-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: kidexa-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for kidexa-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 39197b9ee8baa7bf198f33f432cb867e1fc218749833396c103dd4fa29f769a8
MD5 eb67f2d3a816b62038a4b4993211d726
BLAKE2b-256 9fee3b4fe153bf6590ea3a1ae53531cf75bed72d80c360c2a95861445e809974

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