RandomPhone is a package for generating random phone numbers. It currently supports UK phone numbers pulled from the Ofcom telephone numbers for use in TV and radio drama
Easy way:
pip install RandomPhone
RandomPhone can create landlines, mobiles, freephone, premium, and local rate numbers.
from random_phone import RandomUkPhone
rukp = RandomUkPhone()
rukp.random_landline()
rukp.random_mobile()
rukp.random_freephone()
rukp.random_premium()
rukp.random_ukwide()
An optional parameter international
can be passed to place the international dialing prefix on the front (+44)