https://github.com/magenta-aps/virk.dk
Integration with the Danish Business Authority's Web API.
https://github.com/magenta-aps/virk.dk
cvr python virk
Last synced: about 2 months ago
JSON representation
Integration with the Danish Business Authority's Web API.
- Host: GitHub
- URL: https://github.com/magenta-aps/virk.dk
- Owner: magenta-aps
- License: mpl-2.0
- Created: 2020-01-20T11:24:17.000Z (over 5 years ago)
- Default Branch: development
- Last Pushed: 2022-03-25T13:06:41.000Z (about 3 years ago)
- Last Synced: 2025-03-24T19:39:35.811Z (2 months ago)
- Topics: cvr, python, virk
- Language: Python
- Homepage:
- Size: 95.7 KB
- Stars: 4
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://magenta.dk)
# virk.dk (EARLY DEVELOPMENT STAGES)
Python REST integration with **distribution.virk.dk/cvr-permanent/virksomhed/_search**.
Initiated by MAGENTA ApS as a part of a *Proof Of Concept* for The Danish Environmental Protection Agency, a.k.a. Miljøstyrelsen.
### Prerequisite
The API requires a service account and token from The Danish Business Authority. They can be reached at: [email protected]
### License
Mozilla Public License Version 2.0
### Features
- **get_org_info_from_org_name_and_address(credentials, company_name, streetname, house_no, zipcode)**
*Retrieves company/organisation information from a company name and address information.*- **get_org_info_from_cvr(credentials, cvr_no)**
*Retrieves company/organisation information from a CVR number.*- **get_org_info_from_cvr_p_number_or_name**
*Retrieves company/organisation information from either CVR number, a P number or by name.*### Upcoming features
- **get_all_org_info(credentials, cvr_no)**
*Retrieves all registered information about a given company/organisation.*- **Other suggestions?**
### Installation
virk.dk requires [Python](https://www.python.org/) v3.6+
```sh
$ virtualenv -p python3 test_package
$ cd test_package
$ . bin/activate
$ git clone [email protected]:magenta-aps/virk.dk.git
$ cd virk.dk && python setup.py install
```### Example of implementation
```python
from virk_dk import get_org_info_from_org_name_and_addressinput_dict = {
"virk_usr": "",
"virk_pwd": "",
"virk_url": "http://distribution.virk.dk/cvr-permanent/virksomhed/_search",
"org_name": "MAGENTA ApS",
"street_name": "Pilestræde",
"house_no_from": "43",
"zipcode": "1112"
}
result = get_org_info_from_org_name_and_address(
params_dict=input_dict
)
print(result)
```
```python
from virk_dk import get_org_info_from_cvrinput_dict = {
"virk_usr": "",
"virk_pwd": "",
"virk_url": "http://distribution.virk.dk/cvr-permanent/virksomhed/_search", # note that this could change at some point.
"cvr_number": "25052943"
}result = get_org_info_from_cvr(params_dict=input_dict)
print(result)
```
```python
from virk_dk import get_org_info_from_cvr_p_number_or_nameinput_dict = {
"virk_usr": "",
"virk_pwd": "",
"virk_url": "http://distribution.virk.dk/cvr-permanent/virksomhed/_search", # note that this could change at some point.
"search_term": "25553489" # could be either CVR number (25052943), P number (1019601052) or company name (Magenta Aps).
}
result = get_org_info_from_cvr_p_number_or_name(input_dict)
print(result)
```