Skip to main content

Geo Zone Tool GraphQL client.

Project description

User Guide

This guide is for developers who consume dlubal.api.geo_zone_tool in their applications.

Install

pip install dlubal.api.geo_zone_tool

Authentication

Every API call requires a valid GeoZone token.

TOKEN = "<your-token>"

Import

from dlubal.api import geo_zone_tool

Usage

All services require a token, so create one GeoZoneTool instance and call services through it.

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
user = geo_zone.get_user_data()

Common Enums

  • geo_zone_tool.Language (EN, DE, IT, ...)
  • geo_zone_tool.LoadZoneType (SNOW, WIND, EARTHQUAKE, TORNADO)
  • geo_zone_tool.ScreenshotType (PNG, JPEG)

Examples

Find Locations

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
locations = geo_zone.get_geo_locations(
    address="Flugplatzweg 6, 14913, Germany",
    language=geo_zone_tool.Language.EN,
)

for loc in locations.locations:
    print(loc)

Get User Info

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
user = geo_zone.get_user_data()
print(user)

Get Available Standards

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
standards = geo_zone.get_load_zone_standards(
    country_code="DE",
    language=geo_zone_tool.Language.EN,
)

for group in standards.types:
    print(group.name)

Get Load Zone Characteristics

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
result = geo_zone.get_load_zone_characteristics(
    address="Flugplatzweg 6, 14913, Germany",
    load_zone_type=geo_zone_tool.LoadZoneType.SNOW,
    standard="EN 1991-1-3",
    annex="DIN EN 1991-1-3",
    layer_id=1,
    language=geo_zone_tool.Language.EN,
)

print(result)

Get Screenshot (Base64)

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
screenshot = geo_zone.get_load_zone_screenshot(
    address="Flugplatzweg 6, 14913, Germany",
    load_zone_type=geo_zone_tool.LoadZoneType.SNOW,
    standard="EN 1991-1-3",
    annex="DIN EN 1991-1-3",
    layer_id=1,
    zoom=6,
    screenshot_type=geo_zone_tool.ScreenshotType.JPEG,
    screenshot_quality=80,
)

print(screenshot.screenshot[:40])  # base64 prefix

Stream PDF Progress

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
for msg in geo_zone.get_load_zone_pdf(
    address="Flugplatzweg 6, 14913, Germany",
    standard="EN 1991-1-3",
    annex="DIN EN 1991-1-3",
    layer_id=1,
):
    print(msg.progress_message, msg.state)

Get Final PDF (Base64)

from dlubal.api import geo_zone_tool

geo_zone = geo_zone_tool.GeoZoneTool("<your-token>")
pdf_result = geo_zone.get_load_zone_pdf_result(
    address="Flugplatzweg 6, 14913, Germany",
    standard="EN 1991-1-3",
    annex="DIN EN 1991-1-3",
    layer_id=1,
)

if pdf_result is not None:
    print("PDF ready")

Error Behavior

  • ValueError: empty strings, negative numeric values.
  • TypeError: wrong enum type used in function call.
  • RuntimeError: GraphQL response errors or WebSocket subscription errors.
  • requests.HTTPError: HTTP transport failures.

API Endpoint

The package targets:

  • https://api-gateway.dlubal.com/geo-zone/pub/graphql

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

dlubal_api_geo_zone_tool-0.0.5.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dlubal_api_geo_zone_tool-0.0.5-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file dlubal_api_geo_zone_tool-0.0.5.tar.gz.

File metadata

  • Download URL: dlubal_api_geo_zone_tool-0.0.5.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for dlubal_api_geo_zone_tool-0.0.5.tar.gz
Algorithm Hash digest
SHA256 6d60584b9ce0b38768ac78a78a8bd3b8cfcb53cb7e47d9c69f05a6c60d1a7291
MD5 c424820850d33850556edb0d37c2df5a
BLAKE2b-256 8c4951c6821f06c15de0f22662f12122d0b2c9bc168587925e4a213adb27adf3

See more details on using hashes here.

File details

Details for the file dlubal_api_geo_zone_tool-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for dlubal_api_geo_zone_tool-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8d3195b3239712d0016d422abcbdcaaaee3d100e82ad1d462d0ecf66a32f2c2c
MD5 bc945315b7c3df99bf074aec95c77f8a
BLAKE2b-256 852e61bd9c849d0ba6aab019fc27f1a2accc16e90696d36595424797a1c32d83

See more details on using hashes here.

Supported by

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