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.5.tar.gz (13.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.5-cp311-cp311-win_amd64.whl (117.6 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for kidexa-0.1.5.tar.gz
Algorithm Hash digest
SHA256 e9b3387c88a702700abde74d01ce4cff2003446d0f5f7b05e8089f7ae37c1bbf
MD5 c35c571590d07eefa305f5300992b633
BLAKE2b-256 98368cd6779906b8107c594c699bc9374d8608ca982f45233844e0dac1aad0ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kidexa-0.1.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 117.6 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.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c684743f16ce2f3dbe241761862efc7b9ed872a3659843eff4fc77c2b60bfc8a
MD5 fac932a231d48164a5166bbed4a7e577
BLAKE2b-256 a7536d4ba5b824f286bf3498968835f82f2f16b7abb8b2444ab3120b7626a04e

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