Skip to content

tymiles003/workforce-scripts

 
 

Repository files navigation

Workforce Scripts

A set of python scripts (using multiple libraries) to help administer Workforce projects and services

Supports Python 2.7+ and Python 3.4+ (required for ArcGIS API for Python)

Three sets of scripts that do the same things are provided. One relies on the ArcREST library. A second set relies on ArcGIS API for Python. The stand-a-lone set of scripts are standalone and uses Requests to make GET and POST requests easily and to support Python 2 and 3. All three sets of scripts use arrow to handle datetime conversions.

Features

Functionality Link Script Name
Create Assignments From CSV ArcGIS API For Python
ArcREST
Standalone
create_assignments_from_csv.py
Copy Assignments To Feature Service ArcGIS API For Python
ArcREST
Standalone
copy_assignments_fs.py
Export Assignments to CSV ArcGIS API For Python
ArcREST
Standalone
export_assignments_to_csv.py
Delete Assignments By Query ArcGIS API For Python
ArcREST
Standalone
delete_assignments_by_query.py
Check Assignment Completion ArcGIS API For Python
ArcREST
Standalone
check_completion_location.py
Import Workers ArcGIS API For Python
Standalone
import_workers.py
Create Assignment Types Standalone create_assignment_types.py
Delete Assignment Types Standalone delete_assignment_types.py
Assignment Monitor ArcGIS API For Python assignment_monitor.py

Why are there so many choices?

We provided three different options to use Python to help automate common workflows within Workforce For ArcGIS.

  • If you plan to integrate Workforce with many other systems or significantly modify these scripts, it's probably best if you use the stand-a-lone scripts.
  • If you have existing workflows that use ArcREST for other ArcGIS related scripts, it's probably best if you use the ArcREST scripts.
  • If you are relatively new to Python, have interest in using other geoprocessing analytics, or would like to use Jupyter notebooks, it's probably best if you use the ArcGIS API for Python scripts.

Instructions

ArcGIS API for Python

  1. Install Conda and the ArcGIS API for Python package as described here.
  2. Clone or download this repository
  3. In terminal/cmd navigate to the arcgis_api_for_python folder
  4. Install arrow from PyPi using pip and the requirements.txt file (pip install -r requirements.txt)
  5. You should now be able to run all scripts in the arcgis_api_for_python folder (provided you use the correct arguments)

ArcREST

  1. Install Python 2.7.x or 3.4+ if not already installed
  2. Clone or download this repository
  3. In terminal/cmd navigate to the arcrest_scripts folder
  4. Install ArcREST and arrow from PyPi using pip and the requirements.txt file (pip install -r requirements.txt)
  5. You should now be able to run all script in the arcrest_scripts folder (provided you use the correct arguments)

Standalone

  1. Install Python 2.7.x or 3.4+ if not already installed
  2. Clone or download this repository
  3. In terminal/cmd navigate to the standalone_scripts folder
  4. Install requests and arrow from PyPi using pip and the requirements.txt file (pip install -r requirements.txt)
  5. You should now be able to run all script in the standalone_scripts folder (provided you use the correct arguments)

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2016 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

About

A set of scripts to help administer Workforce projects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%