Skip to main content

A lightweight Python package for extracting data from Esri REST API endpoints.

Project description

ezesri

A lightweight Python package for extracting data from Esri REST API endpoints.

Installation

pip install .

Usage

Python library

You can use ezesri as a library to integrate with your Python scripts.

import ezesri

# URL for a public Esri feature layer
url = "your_esri_layer_url_here"

# Get layer metadata
metadata = ezesri.get_metadata(url)
print(metadata)

# Extract layer to a GeoDataFrame
gdf = ezesri.extract_layer(url)
print(gdf.head())

Command-line interface

ezesri also provides a command-line tool for quick data extraction.

Fetch metadata

ezesri metadata <YOUR_ESRI_LAYER_URL>

Fetch layer data

You can fetch a layer and save it to a file in various formats.

  • GeoJSON

    ezesri fetch <YOUR_ESRI_LAYER_URL> --format geojson --out output.geojson
    
  • Shapefile

    ezesri fetch <YOUR_ESRI_LAYER_URL> --format shapefile --out output.shp
    
  • CSV (geometry is dropped)

    ezesri fetch <YOUR_ESRI_LAYER_URL> --format csv --out output.csv
    

You can also filter by a bounding box (in WGS84 coordinates):

ezesri fetch <URL> --bbox <xmin,ymin,xmax,ymax> --format geojson --out <FILE>

Bulk-fetch all layers from a service

You can discover and export all layers from a MapServer or FeatureServer to a specified directory.

ezesri bulk-fetch <YOUR_ESRI_SERVICE_URL> <YOUR_OUTPUT_DIRECTORY>

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

ezesri-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

ezesri-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ezesri-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for ezesri-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcec505c41be1cbf0dcd332a4e700def4b8007da9a0596266803bde094da3eea
MD5 bada837999cb6c3715bdef74bbfd393d
BLAKE2b-256 2b4b5aa417ce458429ad092182a6baf74ef46f4a6351f2b33ff4f5a3272cc96d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ezesri-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for ezesri-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 257317d74ed9664564591ab7ed3a495721bb7aee1843dec4148b7c872ea30e80
MD5 8b33e83d67ac90e13fb87f23c7579e42
BLAKE2b-256 a7d841e83d13ea1fcf4457bfc4dab56c679de98d7f4596e57ea71742ccf3bb79

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