Skip to main content

A simple and generic temperature converter CLI tool for converting between Celsius, Fahrenheit, and Kelvin.

Project description

🌡 Generic Temperature Converter

A lightweight Python package to convert temperatures between Celsius, Fahrenheit, and Kelvin.
It works both as a command-line tool and as an importable Python module.

📦 Installation

pip install generic-temperature-converter

💻 Command-Line Usage

Once installed, you can run:

tempconv <from_unit> <to_unit>

Example:

tempconv 100 C F

Output:

100.00°C = 212.00°F

📋 Supported Units

Symbol Unit Name
C Celsius
F Fahrenheit
K Kelvin

🐍 Python Module Usage

from generic_temperature_converter.converter import ( celsius_to_fahrenheit, fahrenheit_to_celsius, celsius_to_kelvin, kelvin_to_celsius )

print(celsius_to_fahrenheit(25)) # 77.0 print(fahrenheit_to_celsius(212)) # 100.0 print(celsius_to_kelvin(0)) # 273.15 print(kelvin_to_celsius(300)) # 26.85

✨ Features

  • Supports Celsius ↔ Fahrenheit, Celsius ↔ Kelvin, and Fahrenheit ↔ Kelvin conversions.
  • Works from both CLI and Python scripts.
  • Handles floating-point rounding for clean output.

📄 License

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

generic_temperature_converter-0.1.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

generic_temperature_converter-0.1.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file generic_temperature_converter-0.1.3.tar.gz.

File metadata

File hashes

Hashes for generic_temperature_converter-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c4dd486fd8962abc8c456b7c033c6b496cfedbcc23930f8516bc48f92bf18ffe
MD5 94e966e305fc21e2cbbe20252b00c48d
BLAKE2b-256 2f77855187412ecec9a1ecb6cfbe20ae1e770610966737626ec19e61df77cd06

See more details on using hashes here.

File details

Details for the file generic_temperature_converter-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for generic_temperature_converter-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f3d6ad6b2de60c9ec4a377563e7ecadb215e21060666d51eea211d12b2c601a4
MD5 b0a2bb7a653e9736f70a22bff75de1b7
BLAKE2b-256 96eabe4191232bb2adc2172954188e1884f98b53ef271d55835bfef50dbffd5f

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