The system can be expressed by the following set of ordinary differential equations:
where S is the stock of susceptible population, I is the stock of infected, R is the stock of recovered population, and N is the sum of these three.
The system don't have so-called vital dynamics (birth and death).
This is an example of the output running:
python3 sir.py
With beta 0.2, gamma 0.1 (Basic reproduction mumber, R0=2), initial N of 1.10E6 of population and 1 infected as starting point: