Skip to main content

Kartverket API Client

This Python module provides a simple, asynchronous client for interacting with the Kartverket (Norwegian Mapping Authority) API. It allows you to search for place names (stedsnavn) and retrieve location data.

Features

  • Asynchronous API client using aiohttp.
  • Search for place names with various filtering options.
  • Pydantic models for type-safe data handling.

Installation

  1. Install package:
    pip install kartverkets-api
    

Usage

Here's a basic example of how to use the KartverketAPI client to search for a place name.

import asyncio
from kartverket.api import KartverketAPI

async def main():
    """
    Example usage of the KartverketAPI client.
    """
    # The client is an async context manager
    properties_eier = [{"kommuenummer" : "0301",
                   "gardsnummer" : 240,
                   "bruksnummer" : 12,
                   "festenummer" : 0,
                   "seksjonsnummer" : 0}]
    
    properties_andel = [{"borettslagnummer" : 903456235,
                         "andelsnummer" : 72 }]
    async with KartverketAPI() as client:
        try:
            #Search for a specific property with eier ownership
            result_eier = await client.get_by_property(properties_eier,ownership_type="eier")
            
            #or with andel ownership type
            result_andel = await client.get_by_property(properties_andel,ownership_type="andel")

            print(f'Eier: {result_eier}\nAndel: {result_andel}')
        except Exception as e:
            print(f"An error occurred: {e}")

if __name__ == "__main__":
    asyncio.run(main())

Metadata

Release files for kartverkets-api 0.1.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kartverkets-api 0.1.16
File Size Uploaded Provenance Actions
kartverkets_api-0.1.16.tar.gz 14.8 kB Without provenance Details for kartverkets_api-0.1.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kartverkets-api 0.1.16
File Interpreter ABI Platform Actions
kartverkets_api-0.1.16-py3-none-any.whl Python 3 none any Details for kartverkets_api-0.1.16-py3-none-any.whl

Total release size: 29.8 kB

Release files / kartverkets_api-0.1.16.tar.gz

Download URL kartverkets_api-0.1.16.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d0d4ccf895146b01b79299dcd9d3a25a1ad93e8ce91ad84e458b39ddaeee5986
BLAKE2b-256 checksum
How to use checksums
15545cb401ff5add4c19f04e8beaa2ba3604ae7477cae82f98ee38bcb74120de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0

Release files / kartverkets_api-0.1.16-py3-none-any.whl

Download URL kartverkets_api-0.1.16-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a088d08b45bcfa2c1d96fd4cae4da1402a1ca4b64ebc088a4c2e589f916d80d
BLAKE2b-256 checksum
How to use checksums
9969409ac3b597cbf6ea724b8a5be1b0ac573a45c3d8937d3515a8fcc0d9b085
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0

Security for kartverkets-api 0.1.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.

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page