entirius-django-regon-api
A Django module for Polish company lookups in Entirius, the open-source modular ecommerce platform. Its REST endpoints search the VAT taxpayers registry by NIP or REGON number, and a Python client looks up any NIP in the REGON database (BIR).
What it does
- Looks up a company by NIP or REGON number over REST endpoints, in the VAT taxpayers registry
(
wl-api.mf.gov.pl, throughentirius-py-gov-rejestr-wl-sdk). - Looks up a NIP in the REGON database (BIR,
api.stat.gov.pl) over SOAP from Python code; BIR covers every NIP, sole traders included. - Caches the answers of the lookups in the Django cache; keeps no database state (no models, no migrations).
- Ships the
search_by_nipandsearch_by_regonmanagement commands for probing the VAT registry from the shell.
Installation
uv add entirius-django-regon-api
pip install entirius-django-regon-api
INSTALLED_APPS = [
...
"django_utils",
"django_regon_api",
]
# urls.py
urlpatterns = [
path("", include("django_regon_api.urls")),
]
Endpoints mount under {API_BASE_URL}/regon/<version>/ (nip/<nip>/, regon/<regon>/). They check the identifier
(NIP 10 digits, REGON 9 or 14; spaces and dashes are removed), are throttled per client address (scope
regon_lookup_ip, default 30/hour; the address as django_utils.api.client_ip.get_client_ip resolves it) and answer repeated identifiers from the Django cache.
Every setting is optional and defaults to the registries' public test environments: BIR_API_KEY,
BIR_SERVICE_URL, BIR_WSDL_URL, BIR_VERSIONS, GOV_REJESTR_WL_USE_PROD_ENVIRONMENT, cache prefix and timeouts;
reference with defaults in https://github.com/entirius/entirius-django-regon-api/blob/develop/AGENTS.md (section
Settings).
Quick start
from django_regon_api.services.regon_client import RegonApiClient
company = RegonApiClient().search_by_nip("0000000000")
search_by_nip returns a dictionary in the shape of the VAT registry answer, or None when nothing is found.
Requirements
- Python 3.11 or newer, Django 4.0 or newer.
- Entirius packages pulled in:
entirius-django-utils,entirius-py-gov-rejestr-wl-sdk,entirius-py-bievents,entirius-py-process-logger.
Documentation
- Module docs: https://github.com/entirius/entirius-django-regon-api/tree/develop/docs
- Entirius documentation: https://docs.entirius.com/
- Releases: https://github.com/entirius/entirius-django-regon-api/releases
Part of Entirius
This module runs inside the Entirius backend service (Volkanos), where company data is filled in from a tax number.
- Backend service: https://github.com/entirius/entirius-service-volkanos
- Docker harness: https://github.com/entirius/entirius-zeno
- Sibling modules: https://github.com/entirius/entirius-django-utils, https://github.com/entirius/entirius-django-accounts
- VAT registry SDK: https://github.com/entirius/entirius-py-gov-rejestr-wl-sdk
Development
make install # sync dependencies (uv)
make check # lint + format check (ruff)
make test # test suite (pytest + pytest-django, offline)
Development and agent instructions: https://github.com/entirius/entirius-django-regon-api/blob/develop/AGENTS.md
License
Mozilla Public License 2.0 (MPL-2.0) — see https://github.com/entirius/entirius-django-regon-api/blob/develop/LICENSE.
Metadata
Release files for entirius-django-regon-api 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| entirius_django_regon_api-3.0.1.tar.gz | 90.2 kB | Without provenance | Details for entirius_django_regon_api-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| entirius_django_regon_api-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for entirius_django_regon_api-3.0.1-py3-none-any.whl |
Total release size: 112.2 kB
Release files / entirius_django_regon_api-3.0.1.tar.gz
| Download URL | entirius_django_regon_api-3.0.1.tar.gz |
|---|---|
| Size | 90.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b2125cfd4d74a4e51b54325fe5637be3beb4b822013d82514bea3fddf6f00f1
|
|
BLAKE2b-256 checksum How to use checksums |
5f539d928a974e961daf941bd916f40cf2580b151f32fb1e2fa07210ad45a0fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / entirius_django_regon_api-3.0.1-py3-none-any.whl
| Download URL | entirius_django_regon_api-3.0.1-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99725ed4dec3840c1d3ca28543a02cc08d378715ca058022a5b849194e0ff3f9
|
|
BLAKE2b-256 checksum How to use checksums |
3aa681940b3ef47fdea58afaa57f9407ec13e24856aa9d78ce5de0dbf1454266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for entirius-django-regon-api 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.