No project description provided
Project description
Fathom Python SDK client
The Python SDK client for communicating with the Fathom API
Example usage:
"""An example usage of the Fathom API client."""
import os
from fathom.sdk.v2 import Client, point, polygon, write_tiffs
if __name__ == "__main__":
client = Client(
os.getenv("FATHOM_CLIENT_ID"),
os.getenv("FATHOM_CLIENT_SECRET"),
os.getenv("FATHOM_API_ADDR"),
)
layer_ids = [
"GLOBAL-1ARCSEC-00_OFFSET-1in10-PLUVIAL-DEFENDED-DEPTH-2020-PERCENTILE50-v0.0.0_test",
"GLOBAL-1ARCSEC-00_OFFSET-1in100-PLUVIAL-DEFENDED-DEPTH-2020-PERCENTILE50-v0.0.0_test",
]
# Get from points
pt = point(lat=50.8162643, lng=-1.1081944)
points_response = client.geo.get_points(([pt]), layer_ids)
# Or using a polygon
poly = polygon(
[
point(51.45, 0),
point(51.55, 0),
point(51.55, -0.1),
point(51.45, -0.1),
point(51.45, 0),
]
)
polygon_response = client.geo.get_polygon(poly, layer_ids)
write_tiffs(
polygon_response,
output_dir,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for fathom_global_client_sdk-0.7.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df13b2cff28130bbf1e14067ee4cb4da000ea7397bfb2934d447166510e48692 |
|
MD5 | b5ac1bd73896690c9af258ee18c06a73 |
|
BLAKE2b-256 | 50afe5115aac1e7e31690510aa5de9b42ed993ed31239f9602ff4470a13b40ad |