Skip to main content
Version: v5


(requires Python >= 3.8)

The library can be installed using the following command:

pip install incognia-python

Import the package and configure it with your API credentials.

from incognia.api import IncogniaAPI
# to use the US regionapi = IncogniaAPI('client-id', 'client-secret', 'us')
# to use the BR regionapi = IncogniaAPI('client-id', 'client-secret', 'br')

Then, requests to the Incognia APIs can be easily made through method calls:

from incognia.api import IncogniaAPIfrom incognia.models import StructuredAddress, Coordinates
api = IncogniaAPI('client-id', 'client-secret')  # us region is selected by default.
# with structured address, a dict:structured_address: StructuredAddress = {    'locale': 'en-US',    'country_name': 'United States of America',    'country_code': 'US',    'state': 'NY',    'city': 'New York City',    'borough': 'Manhattan',    'neighborhood': 'Midtown',    'street': 'W 34th St.',    'number': '20',    'complements': 'Floor 2',    'postal_code': '10001'}assessment: dict = api.register_new_signup('installation-id', structured_address=structured_address)
# with address line:address_line: str = '350 Fifth Avenue, Manhattan, New York 10118'assessment: dict = api.register_new_signup('installation-id', address_line=address_line)
# with coordinates, a dict:coordinates: Coordinates = {    'lat': 40.74836007062138,    'lng': -73.98509720487937}assessment: dict = api.register_new_signup('installation-id', address_coordinates=coordinates)

More details are available at the Github repository.