I currently have an arcpy script that selects stores that are open after the user inputs their date and time. I'm looking to embed the results on a website using leaflet. If I have the user input their date and time using an HTML form, how can I pass the results to my arcpy script?

  • you will need a webserver with cgi or wsgi to pass html forms to python scripts. – neogeomat May 20 '18 at 14:09
  • I think you need to investigate the term geoprocessing service. – PolyGeo May 20 '18 at 19:51

As mentioned in the comments, you should look at either some sort of RESTful service via a WSGI server or a Geoprocessing Service, which the latter requires ArcGIS Server.

If you don't have access to ArcGIS Server, I strongly recommend using WSGI server such as Flask, Django, or a handful of other options.

A colleague and I presented this sample mabpox based application that calls on a Python Flask service (see the flask_sample folder). This is a fairly simple example of a custom REST service from a WSGI service. You can run the server locally or for production it is recommended to deploy on IIS or Apache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.