DEV Community

Samandar Ravshanov
Samandar Ravshanov

Posted on

📦Converting between quantities in different units

from functorflow import ff, f

# gram to kilogram
r = f('convert-units.kg', g=2000 )
print(r)

# meter to inches
r = f('convert-units.in', m=5 )
print(r)
Enter fullscreen mode Exit fullscreen mode

Supported Units

Length

mm
cm
m
in
ft-us
ft
mi
Enter fullscreen mode Exit fullscreen mode

Area

mm2
cm2
m2
ha
km2
in2
ft2
ac
mi2
Enter fullscreen mode Exit fullscreen mode

Mass

mcg
mg
g
kg
oz
lb
mt
t
Enter fullscreen mode Exit fullscreen mode

Volume

mm3
cm3
ml
l
kl
m3
km3
tsp
Tbs
in3
fl-oz
cup
pnt
qt
gal
ft3
yd3
Enter fullscreen mode Exit fullscreen mode

Volume Flow Rate

mm3/s
cm3/s
ml/s
cl/s
dl/s
l/s
l/min
l/h
kl/s
kl/min
kl/h
m3/s
m3/min
m3/h
km3/s
tsp/s
Tbs/s
in3/s
in3/min
in3/h
fl-oz/s
fl-oz/min
fl-oz/h
cup/s
pnt/s
pnt/min
pnt/h
qt/s
gal/s
gal/min
gal/h
ft3/s
ft3/min
ft3/h
yd3/s
yd3/min
yd3/h'
Enter fullscreen mode Exit fullscreen mode

Temperature

C
F
K
R
Enter fullscreen mode Exit fullscreen mode

Time

ns
mu
ms
s
min
h
d
week
month
year
Enter fullscreen mode Exit fullscreen mode

Frequency

Hz
mHz
kHz
MHz
GHz
THz
rpm
deg/s
rad/s
Enter fullscreen mode Exit fullscreen mode

Speed

m/s
km/h
m/h
knot
ft/s
Enter fullscreen mode Exit fullscreen mode

Pace

s/m
min/km
s/ft
min/km
Enter fullscreen mode Exit fullscreen mode

Pressure

Pa
hPa
kPa
MPa
bar
torr
psi
ksi
Enter fullscreen mode Exit fullscreen mode

Digital

b
Kb
Mb
Gb
Tb
B
KB
MB
GB
TB
Enter fullscreen mode Exit fullscreen mode

Illuminance

lx
ft-cd
Enter fullscreen mode Exit fullscreen mode

Parts-Per

ppm
ppb
ppt
ppq
Enter fullscreen mode Exit fullscreen mode

Voltage

V
mV
kV
Enter fullscreen mode Exit fullscreen mode

Current

A
mA
kA
Enter fullscreen mode Exit fullscreen mode

Power

W
mW
kW
MW
GW
Enter fullscreen mode Exit fullscreen mode

Apparent Power

VA
mVA
kVA
MVA
GVA
Enter fullscreen mode Exit fullscreen mode

Reactive Power

VAR
mVAR
kVAR
MVAR
GVAR
Enter fullscreen mode Exit fullscreen mode

Energy

Wh
mWh
kWh
MWh
GWh
J
kJ
Enter fullscreen mode Exit fullscreen mode

Reactive Energy

VARh
mVARh
kVARh
MVARh
GVARh
Enter fullscreen mode Exit fullscreen mode

Angle

deg
rad
grad
arcmin
arcsec
Enter fullscreen mode Exit fullscreen mode

Stop wasting time installing and configuring Python libraries. Use them right away. 📦FunctorFlow instantly auto-install and auto-config them for you.

Top comments (0)