normatia
Python client for the Normatia API: Spanish parcels with their constraints and planning, municipalities with their technical data, and regulations as data, article by article.
pip install normatia
from normatia import Normatia
client = Normatia() # reads NORMATIA_API_KEY
parcel = client.get_parcel("6963301TG3466N", include=["constraints", "zoning"])
for layer in parcel["constraints"]["layers"]:
if layer["affected"]: # None is "no data", never "not affected"
print(layer["layer"], layer["summary"])
place = client.get_place("ES-41091")
print(place["technical_data"]["climate_zone"]) # {'value': 'B4', 'source': {'citation': 'CTE DB-HE, Anejo B', ...}}
for regulation in client.iter_regulations(place="ES-41091", scope="municipal"):
print(regulation["slug"], regulation["current_version"]["curated"])
Async, with the same methods:
from normatia import AsyncNormatia
async with AsyncNormatia() as client:
me = await client.get_me()
Sandbox keys
A sandbox key (sk-normatia-test-..., from Mi cuenta > Claves API > Clave de prueba) works with the same client and
needs no API activation: it answers with about fifty fixed parcels and the public catalog, without quota.
client.get_sandbox() lists the parcels; client.is_sandbox tells which kind of key the client has.
Errors
Every error is a NormatiaError with status_code, code (branch on it), message, request_id (send it to
support) and retry_after. By status: AuthenticationError (401), ForbiddenError (403), NotFoundError (404),
ValidationError (422), RateLimitError (429), ServiceUnavailableError (503) and APIError (the rest).
from normatia import NotFoundError
try:
client.get_parcel("4141412VG4444S")
except NotFoundError as e:
print(e.code, e.request_id) # parcel_not_found, req_...
GET requests are retried twice on 429 rate_limit_exceeded, 502, 503, 504 and network errors, waiting Retry-After
when the API sends it (max_retries= to change it). ask and verify spend a credit and are never retried.
Methods
| Method | Route |
|---|---|
get_me(), get_usage(from_date=, to_date=), list_keys(), revoke_key(id) |
/v1/me, /v1/usage, /v1/keys |
get_parcel(ref, include=[...]), find_parcels_at_point(lat, lon), get_sandbox() |
/v1/parcels, /v1/sandbox |
list_layers(), get_coverage(place) |
/v1/layers, /v1/coverage |
find_places(q, level=, within=), get_place(place) |
/v1/places |
list_regulations(...), iter_regulations(...), get_regulation(slug), get_regulation_contents(slug), get_regulation_section(slug, section) |
/v1/regulations |
ask(query, project_id=), verify(element=, parameter=, value=, unit=, geo_id=) |
/api/v2/ask, /api/v1/verify (one credit each) |
Responses are plain dicts, typed with TypedDict for editors (normatia.types).
License
MIT
Metadata
Release files for normatia 0.1.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 |
|---|---|---|---|---|
| normatia-0.1.0.tar.gz | 11.9 kB | With provenance | Details for normatia-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| normatia-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for normatia-0.1.0-py3-none-any.whl |
Total release size: 24.0 kB
Release files / normatia-0.1.0.tar.gz
| Download URL | normatia-0.1.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fc03797dc92b726522c6461d99ca46662559dbe15876876042ac84dc3dfbd3e
|
|
BLAKE2b-256 checksum How to use checksums |
72cf87d1f8aa2891702128a07d771a90fbc0789c6d7f5f6ad8737ed2b11718fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / normatia-0.1.0-py3-none-any.whl
| Download URL | normatia-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2b69dfeb3bb0109662460319f44cb1089c24f5e98ee78ddb5ddfc116304ac04
|
|
BLAKE2b-256 checksum How to use checksums |
336c895e909aae8134dd0d020ca68b6f13ce3bb172ebd4dbdf45247fcbe1434a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for normatia 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for normatia-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA 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.