from pyrogram import Client, filters
from pyrogram.types import InputPhoneContact
api_id = 12345678
api_hash = "aaaassdddd1234"
app = Client("number", api_id=api_id, api_hash=api_hash)
with app:
app.import_contacts([InputPhoneContact("9001234567", "test")])
contacts = app.get_contacts()
print(contacts)