harriers-lustr
Jurisdiction-agnostic company-register lookup. Give it a jurisdiction and a registration id (CZ: IČO), get back jurisdiction-neutral company data — name, VAT id, legal form, seat address, responsible tax office — through one small interface.
Bundled providers: CZ → ARES and SK → RPO (both real, public REST APIs).
Framework-free (only depends on httpx); an optional Django cache adapter is included.
Install
From PyPI:
pip install harriers-lustr
Usage
import harriers_lustr
# Method 1 — the registration-id format for jurisdiction (drives input UI).
fmt = harriers_lustr.id_format("CZ")
print(fmt.label, fmt.example) # "IČO" "27082440"
# Method 2 — the company data for a registration id.
subject = harriers_lustr.fetch_subject("CZ", "27082440")
print(subject.name) # "Alza.cz a.s."
print(subject.vat_id) # "CZ27082440"
print(subject.legal_form_name) # "Akciová společnost"
print(subject.tax_office_code) # "451" (ÚFO resolved from the seat's kraj)
fetch_subject returns a frozen RegistrySubject dataclass and
raises typed errors: InvalidRegistrationId, RegistryNotFound, RegistryUnavailable,
UnknownJurisdiction (all subclasses of RegistryError).
harriers_lustr.jurisdictions() lists the supported jurisdictions for a picker.
Slovakia
The identity (name, legal form, seat) comes from RPO, which needs no auth. The VAT id (IČ DPH) lives in a separate register — the Financial Administration's OpenData portal — which needs a free, self-service API key:
harriers_lustr.configure_sk(fs_dph_key="…") # or set LUSTR_SK_DPH_KEY in the environment
The key is required: the VAT lookup is a step of every SK company lookup, so a
missing key or an unreachable FS register raises RegistryUnavailable instead of
returning a subject. That way an empty vat_id always means "not a VAT payer" and never
"could not be checked".
Caching
Lookups are cached (12h TTL) so repeated queries don't hit the register. By default the
cache is a process-local in-memory store — zero config. To share a cache across
processes, inject any backend with get/set/delete:
harriers_lustr.configure_cache(my_cache)
Django
An adapter over django.core.cache ships in harriers_lustr.contrib.django (imports Django
lazily, so it stays an optional dependency). Wire it once at startup:
import harriers_lustr
from harriers_lustr.contrib.django import DjangoCache
harriers_lustr.configure_cache(DjangoCache()) # the "default" cache alias
harriers_lustr.configure_cache(DjangoCache("redis")) # a named alias
Mapping a RegistrySubject onto your own models (an Organization, a contact/party,
…) stays in your project — harriers-lustr only returns the neutral data.
Adding a jurisdiction
Subclass RegistryProvider (implement id_format + fetch, optionally normalize_id)
and register it:
import harriers_lustr
class MyProvider(harriers_lustr.RegistryProvider):
jurisdiction = "PL"
name = "Polska"
register_name = "KRS"
def id_format(self): ...
def fetch(self, registration_id): ...
harriers_lustr.register_provider(MyProvider())
Development
pip install -e ".[test]"
pytest
Releasing
The version is derived from the git tag (hatch-vcs). To cut a release:
git tag v0.1.0
git push origin v0.1.0
The CI publish job builds the sdist+wheel and uploads them to PyPI via
trusted publishing (OIDC — no API token
stored in CI). One-time prerequisite: the PyPI project harriers-lustr must list this
GitLab repo as a trusted publisher — for the very first release, register a
pending publisher
on PyPI for gitlab.com namespace harriers, project lustr.
License
MIT — see LICENSE.
Metadata
Release files for harriers-lustr 0.2.0
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 |
|---|---|---|---|---|
| harriers_lustr-0.2.0.tar.gz | 24.9 kB | Without provenance | Details for harriers_lustr-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| harriers_lustr-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for harriers_lustr-0.2.0-py3-none-any.whl |
Total release size: 48.9 kB
Release files / harriers_lustr-0.2.0.tar.gz
| Download URL | harriers_lustr-0.2.0.tar.gz |
|---|---|
| Size | 24.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a66eb7d93d8b3009656da3692a7a650887fd716dafa9be1978e0284b7fc86b23
|
|
BLAKE2b-256 checksum How to use checksums |
e0dafa0ee52a66c7e0fb063cc193278474c979eaeff4125c668419b418342298
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / harriers_lustr-0.2.0-py3-none-any.whl
| Download URL | harriers_lustr-0.2.0-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4f53a6cb518883840bab5db02ca676bd72f68254a7d6b9831cc8f5ef6207b9d
|
|
BLAKE2b-256 checksum How to use checksums |
48bfed7c0852e7a2b7956e0f23872ff5f24609e04915d5e8ef55947bef63372d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for harriers-lustr 0.2.0
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.