Anyone who has a clue about how physical units works will of course realize that kWh/1000h
means "1000 watt-hours per 1000 hours" which can be shortened to just W
.
But when it comes to lamps, the unit "W" is already used for the light output. Light bulbs which use more energy-efficient technologies than the classical incandescent light bulb often state their light output in equivalency to an incandescent bulb with a specific power consumption. Until 2010 you could often find LED light bulbs stating to be "equivalent to a 40W bulb". So the consumer knows that if they want to replace an old 40W incandescent bulb with an equally bright LED bulb, they need to look for a 40W LED bulb. A consumer buying an LED lamp with an input power of 40W might be surprised by how bright it is.
Also, the average consumer doesn't know much about how electricity works. They know they need to pay for their electricity consumption in a unit called "kWh", so they want to know how much they need to pay when they run the device for x hours.
So from the point of view of the average consumer, the unit "Watt" means "light-intensity" and "kWh per hour" means "energy consumption". A physicist will of course inject that the unit for visible light radiated by a source is "Lumen" and "Watt" is the unit energy consumption should be measured in, so that's what should be printed on light bulb boxes. But physicists aren't average consumers.
Using different units for each - even if both of them are misleading from a physicist's point of view - is what's the least misleading way to communicate it to the end-user.
If you can only take measurement at discrete times, then summing up and dividing by the time between measurements is the only way possible – the integral
$$E_\text{total}=\int\limits_{T_\text{start}}^{T_\text{end}} P(t) dt$$
really collapses to a sum, it \$P(t)\$ is only known for set of points. For example, assume the power value is constant for amount of time that you spend between your \$N\$ individual measurements, let's call that \$T_\text{sample}\$, then
$$\begin{align}
\tilde E &= \sum\limits_{n=0}^{N-1} T_\text{sample}\cdot P(nT)\\
&= T_\text{sample} \sum\limits_{n=0}^{N-1} P(nT)\\
\end{align}$$
Now, you say
a set of points that doesn't really have any rhyme or reason
Well, that's a problem. What if the power goes up between two measurement points, and just happens to be low every time you're actually taking note?
The answer to this problem is the Nyquist-Shannon Sampling Theorem, which is quite handy in a lot of signal processing applications, but in this case it means:
If you have a real signal (here: your power measurements) whose highest frequency is \$f_\text{max}\$, then you will need to look with twice that frequency at it to be sure not to miss anything, i.e. \$f_\text{sample}\ge 2f_\text{max}\$.
Frequency here means the amount of time between two consecutive events. That means that if you can say "the shortest power fluctuation I need to consider is \$T\$ long (e.g. 5 second)", then your signals highest frequency \$f_\text{max}= \frac1T\$ (i.e. 0.2 Hz in the 5s case), and you'll need to sample twice that often, so \$f_\text{sample} \ge 2f_\text{max}=\frac2T\$, or considering the sampling interval \$T_\text{sample}=\frac1{f_\text{sample}}\le \frac12 T\$.
If you sample slower than that, your measurement is not representative for your observed (unless you have another, restricting model for how the power consumption fluctuates, which you don't seem to have), and no statement can be drawn from your set of measurement points.
If you then have the measurements in a sensible, constant time interval, just adding them up and multiplying the result with that interval will give you your total energy reading. You don't need any special python modules for that, i.e. simply
### assuming "powers" is a list / iterable of your power measurements in Watt,
### and "T" contains the sample interval in seconds
total_power = sum(powers) / 1000 * T / 3600
will give you your kWh.
Now, you might say "how should I know how fast my appliances turn on and off?"
In many scenarios, you can put a sensible limit to power fluctuation. For example, sure, lights might switch on and of within fractions of a second, but the amount of power consumed by quickly switched off lights (e.g. toilet usage, turn on, 60s, turn off) is probably negligible,
whereas things that really matter (fridge, water heater, washing machine, oven) tend to change relatively slow in a typical home usage scenario.
Best Answer
"10 amps" and "2.16 kilowatt-hours" are not the same units and can't be directly converted. An amp is current, a kWh is energy.
However, "10 amps at 240 volts for 1 month" is energy. Google will happily convert the units, if you ask it "(10 amps * 240 volts * 1 month) in kwh": 1,753 kWh.
Coming from the other direction, since kWh is energy, it doesn't make sense to talk about using 2.16 kWh "constantly, for a whole month". 2.16 kWh represents the total energy usage, not a rate of power consumption. You could use 2.16 kWh up in a minute or in a month or a year.