Skip to main content

Democritus functions for easily converting dates, times, temperatures, and distances.

Project description

Democritus Converters

PyPI CI Lint codecov The Democritus Project uses semver version 2.0.0 The Democritus Project uses black to format code License: LGPL v3

Democritus functions[1] for easily converting dates, times, temperatures, and distances.

[1] Democritus functions are simple, effective, modular, well-tested, and well-documented Python functions.

We use d8s as an abbreviation for democritus (you can read more about this here).

Functions

  • def convert(quantity: Union[int, float], starting_unit: str, converted_unit: str):
        """Convert the quantity from the starting_unit to the converted_unit."""
    
  • def seconds_to_minutes(seconds):
        """."""
    
  • def seconds_to_hours(seconds):
        """."""
    
  • def seconds_to_days(seconds):
        """."""
    
  • def seconds_to_weeks(seconds):
        """."""
    
  • def seconds_to_fortnights(seconds):
        """."""
    
  • def seconds_to_years(seconds):
        """."""
    
  • def seconds_to_months(seconds):
        """."""
    
  • def seconds_to_centuries(seconds):
        """."""
    
  • def seconds_to_millenniums(seconds):
        """."""
    
  • def minutes_to_seconds(minutes):
        """."""
    
  • def minutes_to_hours(minutes):
        """."""
    
  • def minutes_to_days(minutes):
        """."""
    
  • def minutes_to_weeks(minutes):
        """."""
    
  • def minutes_to_fortnights(minutes):
        """."""
    
  • def minutes_to_years(minutes):
        """."""
    
  • def minutes_to_months(minutes):
        """."""
    
  • def minutes_to_centuries(minutes):
        """."""
    
  • def minutes_to_millenniums(minutes):
        """."""
    
  • def hours_to_seconds(hours):
        """."""
    
  • def hours_to_minutes(hours):
        """."""
    
  • def hours_to_days(hours):
        """."""
    
  • def hours_to_weeks(hours):
        """."""
    
  • def hours_to_fortnights(hours):
        """."""
    
  • def hours_to_years(hours):
        """."""
    
  • def hours_to_months(hours):
        """."""
    
  • def hours_to_centuries(hours):
        """."""
    
  • def hours_to_millenniums(hours):
        """."""
    
  • def days_to_seconds(days):
        """."""
    
  • def days_to_minutes(days):
        """."""
    
  • def days_to_hours(days):
        """."""
    
  • def days_to_weeks(days):
        """."""
    
  • def days_to_fortnights(days):
        """."""
    
  • def days_to_years(days):
        """."""
    
  • def days_to_months(days):
        """."""
    
  • def days_to_centuries(days):
        """."""
    
  • def days_to_millenniums(days):
        """."""
    
  • def weeks_to_seconds(weeks):
        """."""
    
  • def weeks_to_minutes(weeks):
        """."""
    
  • def weeks_to_hours(weeks):
        """."""
    
  • def weeks_to_days(weeks):
        """."""
    
  • def weeks_to_fortnights(weeks):
        """."""
    
  • def weeks_to_years(weeks):
        """."""
    
  • def weeks_to_months(weeks):
        """."""
    
  • def weeks_to_centuries(weeks):
        """."""
    
  • def weeks_to_millenniums(weeks):
        """."""
    
  • def fortnights_to_seconds(fortnights):
        """."""
    
  • def fortnights_to_minutes(fortnights):
        """."""
    
  • def fortnights_to_hours(fortnights):
        """."""
    
  • def fortnights_to_days(fortnights):
        """."""
    
  • def fortnights_to_weeks(fortnights):
        """."""
    
  • def fortnights_to_years(fortnights):
        """."""
    
  • def fortnights_to_months(fortnights):
        """."""
    
  • def fortnights_to_centuries(fortnights):
        """."""
    
  • def fortnights_to_millenniums(fortnights):
        """."""
    
  • def years_to_seconds(years):
        """."""
    
  • def years_to_minutes(years):
        """."""
    
  • def years_to_hours(years):
        """."""
    
  • def years_to_days(years):
        """."""
    
  • def years_to_weeks(years):
        """."""
    
  • def years_to_fortnights(years):
        """."""
    
  • def years_to_months(years):
        """."""
    
  • def years_to_centuries(years):
        """."""
    
  • def years_to_millenniums(years):
        """."""
    
  • def months_to_seconds(months):
        """."""
    
  • def months_to_minutes(months):
        """."""
    
  • def months_to_hours(months):
        """."""
    
  • def months_to_days(months):
        """."""
    
  • def months_to_weeks(months):
        """."""
    
  • def months_to_fortnights(months):
        """."""
    
  • def months_to_years(months):
        """."""
    
  • def months_to_centuries(months):
        """."""
    
  • def months_to_millenniums(months):
        """."""
    
  • def centuries_to_seconds(centuries):
        """."""
    
  • def centuries_to_minutes(centuries):
        """."""
    
  • def centuries_to_hours(centuries):
        """."""
    
  • def centuries_to_days(centuries):
        """."""
    
  • def centuries_to_weeks(centuries):
        """."""
    
  • def centuries_to_fortnights(centuries):
        """."""
    
  • def centuries_to_years(centuries):
        """."""
    
  • def centuries_to_months(centuries):
        """."""
    
  • def centuries_to_millenniums(centuries):
        """."""
    
  • def millenniums_to_seconds(millenniums):
        """."""
    
  • def millenniums_to_minutes(millenniums):
        """."""
    
  • def millenniums_to_hours(millenniums):
        """."""
    
  • def millenniums_to_days(millenniums):
        """."""
    
  • def millenniums_to_weeks(millenniums):
        """."""
    
  • def millenniums_to_fortnights(millenniums):
        """."""
    
  • def millenniums_to_years(millenniums):
        """."""
    
  • def millenniums_to_months(millenniums):
        """."""
    
  • def millenniums_to_centuries(millenniums):
        """."""
    
  • def meters_to_centimeters(meters):
        """."""
    
  • def meters_to_millimeters(meters):
        """."""
    
  • def meters_to_kilometers(meters):
        """."""
    
  • def meters_to_inches(meters):
        """."""
    
  • def meters_to_hands(meters):
        """."""
    
  • def meters_to_feet(meters):
        """."""
    
  • def meters_to_yards(meters):
        """."""
    
  • def meters_to_miles(meters):
        """."""
    
  • def meters_to_light_years(meters):
        """."""
    
  • def meters_to_astronomical_units(meters):
        """."""
    
  • def meters_to_parsecs(meters):
        """."""
    
  • def meters_to_nautical_miles(meters):
        """."""
    
  • def meters_to_angstroms(meters):
        """."""
    
  • def meters_to_microns(meters):
        """."""
    
  • def meters_to_planck_lengths(meters):
        """."""
    
  • def centimeters_to_meters(centimeters):
        """."""
    
  • def centimeters_to_millimeters(centimeters):
        """."""
    
  • def centimeters_to_kilometers(centimeters):
        """."""
    
  • def centimeters_to_inches(centimeters):
        """."""
    
  • def centimeters_to_hands(centimeters):
        """."""
    
  • def centimeters_to_feet(centimeters):
        """."""
    
  • def centimeters_to_yards(centimeters):
        """."""
    
  • def centimeters_to_miles(centimeters):
        """."""
    
  • def centimeters_to_light_years(centimeters):
        """."""
    
  • def centimeters_to_astronomical_units(centimeters):
        """."""
    
  • def centimeters_to_parsecs(centimeters):
        """."""
    
  • def centimeters_to_nautical_miles(centimeters):
        """."""
    
  • def centimeters_to_angstroms(centimeters):
        """."""
    
  • def centimeters_to_microns(centimeters):
        """."""
    
  • def centimeters_to_planck_lengths(centimeters):
        """."""
    
  • def millimeters_to_meters(millimeters):
        """."""
    
  • def millimeters_to_centimeters(millimeters):
        """."""
    
  • def millimeters_to_kilometers(millimeters):
        """."""
    
  • def millimeters_to_inches(millimeters):
        """."""
    
  • def millimeters_to_hands(millimeters):
        """."""
    
  • def millimeters_to_feet(millimeters):
        """."""
    
  • def millimeters_to_yards(millimeters):
        """."""
    
  • def millimeters_to_miles(millimeters):
        """."""
    
  • def millimeters_to_light_years(millimeters):
        """."""
    
  • def millimeters_to_astronomical_units(millimeters):
        """."""
    
  • def millimeters_to_parsecs(millimeters):
        """."""
    
  • def millimeters_to_nautical_miles(millimeters):
        """."""
    
  • def millimeters_to_angstroms(millimeters):
        """."""
    
  • def millimeters_to_microns(millimeters):
        """."""
    
  • def millimeters_to_planck_lengths(millimeters):
        """."""
    
  • def kilometers_to_meters(kilometers):
        """."""
    
  • def kilometers_to_centimeters(kilometers):
        """."""
    
  • def kilometers_to_millimeters(kilometers):
        """."""
    
  • def kilometers_to_inches(kilometers):
        """."""
    
  • def kilometers_to_hands(kilometers):
        """."""
    
  • def kilometers_to_feet(kilometers):
        """."""
    
  • def kilometers_to_yards(kilometers):
        """."""
    
  • def kilometers_to_miles(kilometers):
        """."""
    
  • def kilometers_to_light_years(kilometers):
        """."""
    
  • def kilometers_to_astronomical_units(kilometers):
        """."""
    
  • def kilometers_to_parsecs(kilometers):
        """."""
    
  • def kilometers_to_nautical_miles(kilometers):
        """."""
    
  • def kilometers_to_angstroms(kilometers):
        """."""
    
  • def kilometers_to_microns(kilometers):
        """."""
    
  • def kilometers_to_planck_lengths(kilometers):
        """."""
    
  • def inches_to_meters(inches):
        """."""
    
  • def inches_to_centimeters(inches):
        """."""
    
  • def inches_to_millimeters(inches):
        """."""
    
  • def inches_to_kilometers(inches):
        """."""
    
  • def inches_to_hands(inches):
        """."""
    
  • def inches_to_feet(inches):
        """."""
    
  • def inches_to_yards(inches):
        """."""
    
  • def inches_to_miles(inches):
        """."""
    
  • def inches_to_light_years(inches):
        """."""
    
  • def inches_to_astronomical_units(inches):
        """."""
    
  • def inches_to_parsecs(inches):
        """."""
    
  • def inches_to_nautical_miles(inches):
        """."""
    
  • def inches_to_angstroms(inches):
        """."""
    
  • def inches_to_microns(inches):
        """."""
    
  • def inches_to_planck_lengths(inches):
        """."""
    
  • def hands_to_meters(hands):
        """."""
    
  • def hands_to_centimeters(hands):
        """."""
    
  • def hands_to_millimeters(hands):
        """."""
    
  • def hands_to_kilometers(hands):
        """."""
    
  • def hands_to_inches(hands):
        """."""
    
  • def hands_to_feet(hands):
        """."""
    
  • def hands_to_yards(hands):
        """."""
    
  • def hands_to_miles(hands):
        """."""
    
  • def hands_to_light_years(hands):
        """."""
    
  • def hands_to_astronomical_units(hands):
        """."""
    
  • def hands_to_parsecs(hands):
        """."""
    
  • def hands_to_nautical_miles(hands):
        """."""
    
  • def hands_to_angstroms(hands):
        """."""
    
  • def hands_to_microns(hands):
        """."""
    
  • def hands_to_planck_lengths(hands):
        """."""
    
  • def feet_to_meters(feet):
        """."""
    
  • def feet_to_centimeters(feet):
        """."""
    
  • def feet_to_millimeters(feet):
        """."""
    
  • def feet_to_kilometers(feet):
        """."""
    
  • def feet_to_inches(feet):
        """."""
    
  • def feet_to_hands(feet):
        """."""
    
  • def feet_to_yards(feet):
        """."""
    
  • def feet_to_miles(feet):
        """."""
    
  • def feet_to_light_years(feet):
        """."""
    
  • def feet_to_astronomical_units(feet):
        """."""
    
  • def feet_to_parsecs(feet):
        """."""
    
  • def feet_to_nautical_miles(feet):
        """."""
    
  • def feet_to_angstroms(feet):
        """."""
    
  • def feet_to_microns(feet):
        """."""
    
  • def feet_to_planck_lengths(feet):
        """."""
    
  • def yards_to_meters(yards):
        """."""
    
  • def yards_to_centimeters(yards):
        """."""
    
  • def yards_to_millimeters(yards):
        """."""
    
  • def yards_to_kilometers(yards):
        """."""
    
  • def yards_to_inches(yards):
        """."""
    
  • def yards_to_hands(yards):
        """."""
    
  • def yards_to_feet(yards):
        """."""
    
  • def yards_to_miles(yards):
        """."""
    
  • def yards_to_light_years(yards):
        """."""
    
  • def yards_to_astronomical_units(yards):
        """."""
    
  • def yards_to_parsecs(yards):
        """."""
    
  • def yards_to_nautical_miles(yards):
        """."""
    
  • def yards_to_angstroms(yards):
        """."""
    
  • def yards_to_microns(yards):
        """."""
    
  • def yards_to_planck_lengths(yards):
        """."""
    
  • def miles_to_meters(miles):
        """."""
    
  • def miles_to_centimeters(miles):
        """."""
    
  • def miles_to_millimeters(miles):
        """."""
    
  • def miles_to_kilometers(miles):
        """."""
    
  • def miles_to_inches(miles):
        """."""
    
  • def miles_to_hands(miles):
        """."""
    
  • def miles_to_feet(miles):
        """."""
    
  • def miles_to_yards(miles):
        """."""
    
  • def miles_to_light_years(miles):
        """."""
    
  • def miles_to_astronomical_units(miles):
        """."""
    
  • def miles_to_parsecs(miles):
        """."""
    
  • def miles_to_nautical_miles(miles):
        """."""
    
  • def miles_to_angstroms(miles):
        """."""
    
  • def miles_to_microns(miles):
        """."""
    
  • def miles_to_planck_lengths(miles):
        """."""
    
  • def light_years_to_meters(light_years):
        """."""
    
  • def light_years_to_centimeters(light_years):
        """."""
    
  • def light_years_to_millimeters(light_years):
        """."""
    
  • def light_years_to_kilometers(light_years):
        """."""
    
  • def light_years_to_inches(light_years):
        """."""
    
  • def light_years_to_hands(light_years):
        """."""
    
  • def light_years_to_feet(light_years):
        """."""
    
  • def light_years_to_yards(light_years):
        """."""
    
  • def light_years_to_miles(light_years):
        """."""
    
  • def light_years_to_astronomical_units(light_years):
        """."""
    
  • def light_years_to_parsecs(light_years):
        """."""
    
  • def light_years_to_nautical_miles(light_years):
        """."""
    
  • def light_years_to_angstroms(light_years):
        """."""
    
  • def light_years_to_microns(light_years):
        """."""
    
  • def light_years_to_planck_lengths(light_years):
        """."""
    
  • def astronomical_units_to_meters(astronomical_units):
        """."""
    
  • def astronomical_units_to_centimeters(astronomical_units):
        """."""
    
  • def astronomical_units_to_millimeters(astronomical_units):
        """."""
    
  • def astronomical_units_to_kilometers(astronomical_units):
        """."""
    
  • def astronomical_units_to_inches(astronomical_units):
        """."""
    
  • def astronomical_units_to_hands(astronomical_units):
        """."""
    
  • def astronomical_units_to_feet(astronomical_units):
        """."""
    
  • def astronomical_units_to_yards(astronomical_units):
        """."""
    
  • def astronomical_units_to_miles(astronomical_units):
        """."""
    
  • def astronomical_units_to_light_years(astronomical_units):
        """."""
    
  • def astronomical_units_to_parsecs(astronomical_units):
        """."""
    
  • def astronomical_units_to_nautical_miles(astronomical_units):
        """."""
    
  • def astronomical_units_to_angstroms(astronomical_units):
        """."""
    
  • def astronomical_units_to_microns(astronomical_units):
        """."""
    
  • def astronomical_units_to_planck_lengths(astronomical_units):
        """."""
    
  • def parsecs_to_meters(parsecs):
        """."""
    
  • def parsecs_to_centimeters(parsecs):
        """."""
    
  • def parsecs_to_millimeters(parsecs):
        """."""
    
  • def parsecs_to_kilometers(parsecs):
        """."""
    
  • def parsecs_to_inches(parsecs):
        """."""
    
  • def parsecs_to_hands(parsecs):
        """."""
    
  • def parsecs_to_feet(parsecs):
        """."""
    
  • def parsecs_to_yards(parsecs):
        """."""
    
  • def parsecs_to_miles(parsecs):
        """."""
    
  • def parsecs_to_light_years(parsecs):
        """."""
    
  • def parsecs_to_astronomical_units(parsecs):
        """."""
    
  • def parsecs_to_nautical_miles(parsecs):
        """."""
    
  • def parsecs_to_angstroms(parsecs):
        """."""
    
  • def parsecs_to_microns(parsecs):
        """."""
    
  • def parsecs_to_planck_lengths(parsecs):
        """."""
    
  • def nautical_miles_to_meters(nautical_miles):
        """."""
    
  • def nautical_miles_to_centimeters(nautical_miles):
        """."""
    
  • def nautical_miles_to_millimeters(nautical_miles):
        """."""
    
  • def nautical_miles_to_kilometers(nautical_miles):
        """."""
    
  • def nautical_miles_to_inches(nautical_miles):
        """."""
    
  • def nautical_miles_to_hands(nautical_miles):
        """."""
    
  • def nautical_miles_to_feet(nautical_miles):
        """."""
    
  • def nautical_miles_to_yards(nautical_miles):
        """."""
    
  • def nautical_miles_to_miles(nautical_miles):
        """."""
    
  • def nautical_miles_to_light_years(nautical_miles):
        """."""
    
  • def nautical_miles_to_astronomical_units(nautical_miles):
        """."""
    
  • def nautical_miles_to_parsecs(nautical_miles):
        """."""
    
  • def nautical_miles_to_angstroms(nautical_miles):
        """."""
    
  • def nautical_miles_to_microns(nautical_miles):
        """."""
    
  • def nautical_miles_to_planck_lengths(nautical_miles):
        """."""
    
  • def angstroms_to_meters(angstroms):
        """."""
    
  • def angstroms_to_centimeters(angstroms):
        """."""
    
  • def angstroms_to_millimeters(angstroms):
        """."""
    
  • def angstroms_to_kilometers(angstroms):
        """."""
    
  • def angstroms_to_inches(angstroms):
        """."""
    
  • def angstroms_to_hands(angstroms):
        """."""
    
  • def angstroms_to_feet(angstroms):
        """."""
    
  • def angstroms_to_yards(angstroms):
        """."""
    
  • def angstroms_to_miles(angstroms):
        """."""
    
  • def angstroms_to_light_years(angstroms):
        """."""
    
  • def angstroms_to_astronomical_units(angstroms):
        """."""
    
  • def angstroms_to_parsecs(angstroms):
        """."""
    
  • def angstroms_to_nautical_miles(angstroms):
        """."""
    
  • def angstroms_to_microns(angstroms):
        """."""
    
  • def angstroms_to_planck_lengths(angstroms):
        """."""
    
  • def microns_to_meters(microns):
        """."""
    
  • def microns_to_centimeters(microns):
        """."""
    
  • def microns_to_millimeters(microns):
        """."""
    
  • def microns_to_kilometers(microns):
        """."""
    
  • def microns_to_inches(microns):
        """."""
    
  • def microns_to_hands(microns):
        """."""
    
  • def microns_to_feet(microns):
        """."""
    
  • def microns_to_yards(microns):
        """."""
    
  • def microns_to_miles(microns):
        """."""
    
  • def microns_to_light_years(microns):
        """."""
    
  • def microns_to_astronomical_units(microns):
        """."""
    
  • def microns_to_parsecs(microns):
        """."""
    
  • def microns_to_nautical_miles(microns):
        """."""
    
  • def microns_to_angstroms(microns):
        """."""
    
  • def microns_to_planck_lengths(microns):
        """."""
    
  • def planck_lengths_to_meters(planck_lengths):
        """."""
    
  • def planck_lengths_to_centimeters(planck_lengths):
        """."""
    
  • def planck_lengths_to_millimeters(planck_lengths):
        """."""
    
  • def planck_lengths_to_kilometers(planck_lengths):
        """."""
    
  • def planck_lengths_to_inches(planck_lengths):
        """."""
    
  • def planck_lengths_to_hands(planck_lengths):
        """."""
    
  • def planck_lengths_to_feet(planck_lengths):
        """."""
    
  • def planck_lengths_to_yards(planck_lengths):
        """."""
    
  • def planck_lengths_to_miles(planck_lengths):
        """."""
    
  • def planck_lengths_to_light_years(planck_lengths):
        """."""
    
  • def planck_lengths_to_astronomical_units(planck_lengths):
        """."""
    
  • def planck_lengths_to_parsecs(planck_lengths):
        """."""
    
  • def planck_lengths_to_nautical_miles(planck_lengths):
        """."""
    
  • def planck_lengths_to_angstroms(planck_lengths):
        """."""
    
  • def planck_lengths_to_microns(planck_lengths):
        """."""
    
  • def celsius_to_fahrenheit(celsius_temperature):
        """Convert Celsius to Fahrenheit."""
    
  • def celsius_to_kelvin(celsius_temperature):
        """Convert Celsius to Kelvin."""
    
  • def fahrenheit_to_celsius(fahrenheit_temperature):
        """Convert Fahrenheit to Celsius."""
    
  • def fahrenheit_to_kelvin(fahrenheit_temperature):
        """Convert Fahrenheit to Kelvin."""
    
  • def kelvin_to_celsius(kelvin_temperature):
        """Convert Kelvin to Celsius."""
    
  • def kelvin_to_fahrenheit(kelvin_temperature):
        """Convert Kelvin to Fahrenheit."""
    
  • def celsius_to_felsius(celsius_temperature):
        """Convert the celsius_temperature into the Felsius temperature (see https://xkcd.com/1923/)."""
    
  • def fahrenheit_to_felsius(fahrenheit_temperature):
        """Convert the fahrenheit_temperature into the Felsius temperature (see https://xkcd.com/1923/)."""
    
  • def kelvin_to_felsius(kelvin_temperature):
        """Convert the kelvin_temperature into the Felsius temperature (see https://xkcd.com/1923/)."""
    

Development

👋  If you want to get involved in this project, we have some short, helpful guides below:

If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.

Credits

This package was created with Cookiecutter and Floyd Hightower's Python project template.

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

d8s_converters-0.6.2.tar.gz (42.2 kB view hashes)

Uploaded Source

Built Distribution

d8s_converters-0.6.2-py2.py3-none-any.whl (32.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page