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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file numo-0.1.6.tar.gz.
File metadata
- Download URL: numo-0.1.6.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6044a085facf7eb6b454a68be35c42816ec31d2699690a5ad9a7db452581bfef
|
|
| MD5 |
8f0629a8d24dd8eb9b11a02b2be15d40
|
|
| BLAKE2b-256 |
edf3c11da5e5cf89b93d481c568f58c987cb87280c6d89456fad30b51999e72d
|
File details
Details for the file numo-0.1.6-py3-none-any.whl.
File metadata
- Download URL: numo-0.1.6-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6b68b6ab0ff6e995d0b106a932eb8a2bdd2da437a79c2d84f2dcab9a581f163
|
|
| MD5 |
089cae6f57ff012be5773ec96bdcb652
|
|
| BLAKE2b-256 |
04c268af08bdf3da1dde276ae86c7128a5c332f689dc6efa9891e6859325649a
|