Skip to main content

A Python library for mathematical operations, unit conversions, currency conversions, and translations

Project description

Numo

A Python library for mathematical operations, unit conversions, currency conversions, and translations.

Features

  • Safe mathematical expression evaluation
  • Unit conversions (length, weight, time, etc.)
  • Currency conversions
  • Text translations
  • Variable management
  • Custom function support

Installation

pip install numo

Usage

from numo import Numo

# Create a Numo instance
numo = Numo()

# Mathematical operations
result = await numo.calculate("2 + 2")  # Returns "4.0"
result = await numo.calculate("3 * 4")  # Returns "12.0"

# Unit conversions
result = await numo.calculate("1 km to m")  # Returns "1000.0"
result = await numo.calculate("100 cm to m")  # Returns "1.0"

# Currency conversions
result = await numo.calculate("100 USD to EUR")  # Returns amount in EUR

# Translations
result = await numo.calculate("hello in spanish")  # Returns "hola"

# Variable management
results = await numo.calculate([
    "x = 5",
    "y = 3",
    "x + y"  # Returns "8.0"
])

# Function calls
result = await numo.calculate("nsum(1,2,3,4)")  # Returns "10.0"

Features

Mathematical Operations

  • Basic arithmetic operations (+, -, *, /, %, ^)
  • Safe evaluation using AST
  • Protection against dangerous operations

Unit Conversions

  • Length (km, m, cm, etc.)
  • Weight (kg, g, lb, etc.)
  • Time (hour, minute, second)
  • Digital storage (gb, mb, kb)
  • And more...

Currency Conversions

  • Real-time exchange rates
  • Support for major currencies
  • Accurate decimal handling

Translations

  • Support for multiple languages
  • Simple "text in language" format
  • Reliable translation service

Variable Management

  • Define and use variables
  • Mathematical operations with variables
  • Persistent variable storage

Function Support

  • Built-in mathematical functions
  • Statistical functions (sum, average, min, max)
  • Safe function execution

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the 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

numo-0.1.7.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

numo-0.1.7-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file numo-0.1.7.tar.gz.

File metadata

  • Download URL: numo-0.1.7.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for numo-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f81195693ad7f9554e162490620f899330b10fa95c538ca3d967addc0b4025cb
MD5 4291b1fc258d515e2170dd7eb67bd9f5
BLAKE2b-256 f538c80486afb16e5050d4d898a38d5de884db42822b9ddbc8b689b18fbf41a6

See more details on using hashes here.

File details

Details for the file numo-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: numo-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for numo-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6dbef803479ade8483242a6495a76addcf57c6dbb1f3beb6db16487ec92595
MD5 0093503ad302e6ed1d73c2b8f2f623ff
BLAKE2b-256 177c5679d3712d7ecfc11aeb915002f92205912bf416f8de45b1ae2e355fb582

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