### Installing GSF Py Library Source: https://github.com/geospatial-services-framework/gsfpy/blob/master/README.rst This command uses pip, the Python package installer, to download and install the GSF Py library from the Python Package Index (PyPI). It's the standard way to get the library set up in a Python environment. ```Shell pip install gsf ``` -------------------------------- ### Submitting an Asynchronous GSF Job (Python) Source: https://github.com/geospatial-services-framework/gsfpy/blob/master/doc/source/index.rst This example shows how to prepare input parameters, including a raster URL and a specific index, and then submit an asynchronous job to the GSF server using the `submit()` method of a `Task` object. A `Job` object is returned, and `wait_for_done()` is called to block until the job completes. ```Python input_raster = dict(url='http://localhost:9191/ese/data/qb_boulder_msi', factory='URLRaster') parameters = dict(INPUT_RASTER=input_raster, INDEX='Normalized Difference Vegetation Index') job = task.submit(parameters) job.wait_for_done() ``` -------------------------------- ### Obtaining a Specific GSF Task Object (Python) Source: https://github.com/geospatial-services-framework/gsfpy/blob/master/doc/source/index.rst This snippet illustrates how to get a specific task object, for example 'SpectralIndex', from a previously retrieved service object. This `Task` object is essential for further interactions like inspecting parameters or submitting jobs. ```Python task = envi_service.task('SpectralIndex') ``` -------------------------------- ### Defining Python Project Dependencies Source: https://github.com/geospatial-services-framework/gsfpy/blob/master/requirements.txt This snippet specifies the exact versions of Python packages required for the project. These dependencies are typically listed in a `requirements.txt` file and are used by package managers like pip to install the necessary libraries, ensuring environment consistency across different development and deployment setups. ```Python coverage==4.1 pylint==1.5.4 setuptools==19.2 Sphinx==1.4.1 Sphinx-PyPI-upload==0.2.1 sphinx_rtd_theme==0.2.4 unittest-xml-reporting==2.1.0 wheel==0.26 ``` -------------------------------- ### Connecting to GSF Server and Listing Services (Python) Source: https://github.com/geospatial-services-framework/gsfpy/blob/master/doc/source/index.rst This snippet demonstrates how to establish a connection to a GSF server by creating a `Server` object with the server's URL and port, and then listing all available services. It requires the `gsf` package to be imported. ```Python from gsf import Server server = Server('localhost','9191') server.services() ``` -------------------------------- ### Retrieving Service Information and Tasks (Python) Source: https://github.com/geospatial-services-framework/gsfpy/blob/master/doc/source/index.rst This code shows how to retrieve detailed information for a specific service, such as 'ENVI', using the `service()` method on the `Server` object. It then lists all tasks associated with that particular service. ```Python envi_service = server.service('ENVI') envi_service.tasks() ``` -------------------------------- ### Accessing Task Parameter Information (Python) Source: https://github.com/geospatial-services-framework/gsfpy/blob/master/doc/source/index.rst This line of code demonstrates how to access the `parameters` property of a GSF `Task` object. This property returns a list of information about the task's required and optional input parameters. ```Python task.parameters ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.