Skip to main content

A package for interacting with the Vjmap Service-API

Project description

vjmap-py-client

Python Client for VjMap REST services

Installation

Install with pip:

pip install vjmap-py-client

Usage

from vjmap_py_client import VjmapClient, RectQueryParameter, PointQueryParameter, ExprQueryParameter, ConditionQueryParameter

client = VjmapClient(access_token="your_access_token", base_url="your_base_url")

# Upload a map
upload_result = client.upload_map(map_file_path="your_map_file_path")
map_id = upload_result["mapid"]
fileid = upload_result["fileid"]
uploadname = upload_result["uploadname"]

# Open a map
result = client.open_map(map_id=map_id,
                         params={"fileid": fileid, "uploadname": uploadname})
version = result["version"]

# List all maps
result = client.list_maps(map_id=map_id, version=version)

# Get bounds
result = client.get_data_bounds(map_id=map_id, version=version)
x1, y1, x2, y2 = result["bounds"]

# Query a map
rect = RectQueryParameter(x1=x1, y1=y1, x2=x2, y2=y2)
# you can also use PointQueryParameter or ExprQueryParameter or ConditionQueryParameter
result = client.query_features(map_id=map_id, version=version, parameters=rect)

# Get metadata
result = client.get_metadata(map_id=map_id, version=version)

# Close a map
result = client.close_map(map_id=map_id, version=version)

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

vjmap_py_client-0.1.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

vjmap_py_client-0.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file vjmap_py_client-0.1.2.tar.gz.

File metadata

  • Download URL: vjmap_py_client-0.1.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for vjmap_py_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f7caf63ca1b10c040797d3a7a8d1300fde261037c31d82fc4bdfc5c1f50827cf
MD5 ab9e4ca02eeab2d52a8e9de45162bf46
BLAKE2b-256 b21bae4b65ffec94771031f3b5a49bd9bc8d4e100df15802b6133ac36fa91ff3

See more details on using hashes here.

File details

Details for the file vjmap_py_client-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for vjmap_py_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3aed5273bc9798d841104b8f32328da26939435a2af9a1a81c8145b481a652b0
MD5 eb452911336ea2551921c897c7209986
BLAKE2b-256 f91544315cfac56753a4a4bdbd25b7950b8514fde582f916e64c794cb991ad20

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