Skip to main content

Deutschlandatlas-API

Project description

Deutschlandatlas

Der Deutschlandatlas ist ein Internetangebot, herausgegeben vom Bundesministerium für Wohnen, Stadtentwicklung und Bauwesen. Dort finden sich interaktive Karten zu gleichwertigen Lebensverhältnissen auf Grundlage aktueller verfügbarer Daten. Informationen zu allen Indikatoren sowie aktuelle Daten in tabellarischer Form stehen online zum Download bereit.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 0.1.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

pip install deutschland[Deutschlandatlas]

poetry install

poetry add deutschland -E Deutschlandatlas

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Usage

Import the package:

from deutschland import Deutschlandatlas

Getting Started

Please follow the installation procedure and then run the following:

import time
from deutschland import Deutschlandatlas
from pprint import pprint
from deutschland.Deutschlandatlas.api import default_api
# Defining the host is optional and defaults to https://www.karto365.de/hosting/rest/services
# See configuration.py for a list of all supported configuration parameters.
configuration = Deutschlandatlas.Configuration(
    host = "https://www.karto365.de/hosting/rest/services"
)



# Enter a context with an instance of the API client
with Deutschlandatlas.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    table = "p_apo_f_ZA2022" # str |  Angaben zu allen online vorliegenden Tabellen finden sich [hier](https://www.karto365.de/portal/sharing/rest/search?q=deutschlandatlas&f=json&num=100&start=1) und [hier](https://www.karto365.de/portal/sharing/rest/search?q=deutschlandatlas&f=json&num=100&start=101)  (default to "p_apo_f_ZA2022")
    where = "1%3D1" # str | Spezifikation einer gewünschten Teilmenge der Daten (z.B.'1=1'). (default to "1%3D1")
    f = "json" # str | Output-Format (z.B. 'json' oder 'html').
    out_fields = "*" # str | Auszugebende Variablen/fields (z.B. '*'). (optional)
    return_geometry = False # bool | Boolsche Angabe, ob Angaben zur Geometrie gesendet werden sollen (z.B. 'false'). (optional)
    spatial_rel = "esriSpatialRelIntersects" # str | spational relation (z.B. 'esriSpatialRelIntersects'). (optional)

    try:
        # query
        api_response = api_instance.query(table, where, f, out_fields=out_fields, return_geometry=return_geometry, spatial_rel=spatial_rel)
        pprint(api_response)
    except Deutschlandatlas.ApiException as e:
        print("Exception when calling DefaultApi->query: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://www.karto365.de/hosting/rest/services

Class Method HTTP request Description
DefaultApi query GET /{table}/MapServer/0/query query

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

kontakt@bund.dev

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in Deutschlandatlas.apis and Deutschlandatlas.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from deutschland.Deutschlandatlas.api.default_api import DefaultApi
  • from deutschland.Deutschlandatlas.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
from deutschland import Deutschlandatlas
from deutschland.Deutschlandatlas.apis import *
from deutschland.Deutschlandatlas.models import *

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

de_deutschlandatlas-0.1.0.tar.gz (38.8 kB view details)

Uploaded Source

Built Distribution

de_deutschlandatlas-0.1.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file de_deutschlandatlas-0.1.0.tar.gz.

File metadata

  • Download URL: de_deutschlandatlas-0.1.0.tar.gz
  • Upload date:
  • Size: 38.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for de_deutschlandatlas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 936905982e59a65a4b29efd6d42ce153bf8376065b8cf9cfee04f1b0c89b6b9d
MD5 f01f99c41f3522356d219cb679b99f3b
BLAKE2b-256 0f78bf05e7c6defa89570c59ca99ae2c3e7f1bfc93647610d1de36ed1f84fc79

See more details on using hashes here.

File details

Details for the file de_deutschlandatlas-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for de_deutschlandatlas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 faa1adb14b539a624039c8e21ad68cc7af1689c59d7adf508030f721e8428b39
MD5 cf321d35d448c34d9d79d149513605db
BLAKE2b-256 cbcef2ea8e1fdca7132f0268dcaf1f6cc1a0b4e1338d31167f7377b6224bc73b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page