Skip to content

Installation & Usage

Bartosz Nowakowski edited this page Apr 12, 2020 · 3 revisions

Installation

pip install RegonAPI

Usage

TEST_API_KEY = "abcde12345abcde12345"
CD_PROJEKT_NIP = "7342867148"

# Authentication
api = RegonAPI(bir_version="bir1.1", is_production=False)
try:
    api.authenticate(key=TEST_API_KEY)
except ApiAuthenticationError as e:
    print("[-]", e)
    exit(0)
except Exception as e:
    raise

# Search by NIP
result = api.searchData(nip=CD_PROJEKT_NIP)
pprint(result)
Clone this wiki locally