from osdatahub import NamesAPI
from os import environ


key = "wLFnRmX8mmjwob5ptbnkjaZfuNVKN3WA"
# key = environ.get("OS_API_KEY") # Get your OS API key from the environment variables

# Create a NameAPI object
names = NamesAPI(key)

# Query the OS Names API
results = names.find("9 Louisa Oakes Close, London, Greater London, E4 8AS England", limit=5)

# Print the results
for feature in results.features:
    print(feature.properties)
