Home Assistant Slider

Does anybody know how to create a slider (volume, temperatur) in python. Simular to Switch.py
Thank you for you help

Use a number entity.