Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bogdal/gusregon
GUS REGON Internet Database Client
https://github.com/bogdal/gusregon
bir1 gus nip pkd python regon
Last synced: about 2 months ago
JSON representation
GUS REGON Internet Database Client
- Host: GitHub
- URL: https://github.com/bogdal/gusregon
- Owner: bogdal
- License: bsd-2-clause
- Created: 2015-04-13T21:35:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-08-06T17:44:58.000Z (over 5 years ago)
- Last Synced: 2024-10-14T01:44:16.935Z (2 months ago)
- Topics: bir1, gus, nip, pkd, python, regon
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 35
- Watchers: 10
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
gusregon
========.. image:: https://img.shields.io/circleci/project/bogdal/gusregon/master.svg
:target: https://circleci.com/gh/bogdal/gusregon/tree/master
.. image:: https://img.shields.io/pypi/v/gusregon.svg
:target: https://pypi.python.org/pypi/gusregon
`GUS (Główny Urząd Statystyczny) REGON `_ Internet Database client which allows to get detailed information about company based on NIP, Regon or KRS number.It requires an **API key** to the `BIR1 service `_.
*Note:* Currently ``django-gusregon`` package is outdated and should be replaced by ``gusregon``.
Quickstart
----------Install the package via ``pip``:
.. code-block:: bash
pip install gusregon
Usage
-----
Returns the business address.. code-block:: python
from gusregon import GUS
gus = GUS(api_key='my_api_key')
gus.get_address(nip='1112223344')output
.. code-block::
{
'name': 'REGON SYSTEMS SPÓŁKA AKCYJNA',
'street_address': 'ul. Tęczowa 14',
'postal_code': '35-322',
'city': 'Rzeszów'
}Returns PKD codes
.. code-block:: python
gus.get_pkd(nip='1112223344')
output
.. code-block::
[
{
'code': '6201Z',
'name': 'DZIAŁALNOŚĆ ZWIĄZANA Z OPROGRAMOWANIEM',
'main': True
},
{
'code': '6312Z':
'name': 'DZIAŁALNOŚĆ PORTALI INTERNETOWYCH',
'main': False
},
...
]Returns all data from BIR1 service
.. code-block:: python
gus.search(nip='1112223344')
output
.. code-block::
{
'adsiedzkraj_symbol': 'PL',
'datazawieszeniadzialalnosci': '',
'jednosteklokalnych': '0',
'rodzajrejestruewidencji_symbol': '138',
'adkorulica_nazwa': '',
...
'adkorpowiat_symbol': '63',
'datawpisudoregon': '2012-06-01',
'rodzajrejestruewidencji_nazwa': 'REJESTR PRZEDSIĘBIORCÓW',
'adsiedznumernieruchomosci': '14',
'adkorkodpocztowy': '35322',
'adsiedzkraj_nazwa': 'POLSKA',
'adsiedzulica_symbol': '10013',
'adsiedzkodpocztowy': '35322',
}Sandbox mode for testing:
.. code-block:: python
from gusregon import GUS
gus = GUS(sandbox=True)
gus.get_address(nip='1112223344')