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.5.tar.gz (14.0 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.5-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: numo-0.1.5.tar.gz
  • Upload date:
  • Size: 14.0 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.5.tar.gz
Algorithm Hash digest
SHA256 eb51a20a33a5f21f3cce5d170991d3159bb5cbca720f34eddc1e05c486a7443a
MD5 d17520c07b29d288942d26a041439b89
BLAKE2b-256 92d64a2709b0576055c94515f76c9c4deec4d24146421d06ca8d9d1fc2e079b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: numo-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ecaaf6ae10c3a5452c939baf95b9a45a292216946a7109ab39f0ab7ba45850fe
MD5 596aa9aafde391651a9266a981762ae7
BLAKE2b-256 b5700262f7fea2f461775e51c1df103979016fad06b2ace09229140cbf3203be

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