为arcgis python工具箱提供打包和发布工具

ags_tool_deplo的Python项目详细描述


概述

此工具提供用于打包和发布的命令行界面 python工具箱到arcgis服务器(10.2.x)。

安装

要安装最新的稳定版本:

pip install python-ags

最新更改:

pip install https://bitbucket.org/databasin/ags_tool_deploy/get/develop.zip#egg=ags_tool_deploy

手动安装:

develop branch下载最新的更改, 提取并执行

python setup.py install

这将把脚本作为

ags_tool_deploy/deploy.py

考虑将此文件夹添加到您的路径。

用法

此工具旨在从控制台中运行。

有关用法的信息,只需运行

python deploy.py --help

下面的命令允许您包括mercurial存储库 信息。这不会捆绑整个存储库,而是 包括指向源存储库和当前分支的链接,以便 您可以运行

hg pull --update

在服务器上删除完整的存储库。

包装

使用package命令将python工具箱绑定到服务中 定义文件。

Usage: deploy.py package [OPTIONS] <toolbox_path> <service_name> <outfile_name>

Package a python toolbox into a service definition file (*.sd). Local
python modules this toolbox references are included automatically.
Requires 7Zip to be installed and on the system PATH.

WARNING: this will overwrite the file <outfile_name> if it already exists.

  Aguments:
  <toolbox_path>:         Filename of python toolbox (*.pyt) to deploy
  <service_name>:         Name of service, including folder(s).  Example: SomeFolder/MyTool
  <outfile>:              Name of the service definition file to create

Options:
  --files <files>                 Wildcard patterns of additional files to
                                  include (relative to toolbox).  Example:
                                  *.csv,some_data.*
  --hg                            Include Mercurial (hg) repository
                                  information?
  --sync                          Execute tool synchronously instead of
                                  asynchronously (default)
  --messages [None|Info|Error|Warning]
                                  Level of messaging for service
  --help                          Show this message and exit.

出版

使用publish命令将python工具箱部署到arcgis 服务器。

Usage: deploy.py publish [OPTIONS] <toolbox_path> <service_name> <server:port> <user>

Publish a python toolbox to an ArcGIS server. Local python modules this
toolbox references are included automatically. Requires 7Zip to be
installed and on the system PATH.

  Aguments:
  <toolbox_path>:         Filename of python toolbox (*.pyt) to deploy
  <service_name>:         Name of service, including folder(s).  Example: SomeFolder/MyTool
  <server:port>:               Hostname and port number of ArcGIS server
  <user>:                 ArcGIS server administrator user name

Options:
  --password <password>           ArcGIS administrator password.  You will be
                                  prompted for this if you do not provide it
  --files <files>                 Wildcard patterns of additional files to
                                  include (relative to toolbox).  Example:
                                  *.csv,some_data.*
  --hg                            Include Mercurial (hg) repository
                                  information?
  --sync                          Execute tool synchronously instead of
                                  asynchronously (default)
  --messages [None|Info|Error|Warning]
                                  Level of messaging for service
  --overwrite                     Delete and replace the service, if it
                                  already exists?
  --help                          Show this message and exit.

要求:

假设

  • 仅支持Python2.7
  • 仅在Windows上测试
  • 仅支持Arcgis 10.2.x

许可证

请参阅许可证文件。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何加载。java文件到编译器?   java写入文件和I/O   java日历返回错误的当前日期安卓   if语句if变量等于1(java)   java很难让Joda有时间使用我的bukkit插件   json如何创建基于java的应用程序,该应用程序将从网站获取输入   java如何在多页中打印大型JPanel   java my spinner在添加从firebase数据库中选择的多个值时被覆盖   java用Play框架覆盖HTTP方法   试图获取所有用户时,java错误请求400。Dto和表格   java支持bean加载图像后javascript自动调用JS函数   java在MTOM的@StreamingAttachment(Metro)中,Parsely的意思是什么   具有可抢占线程队列的多线程java执行器   Java Opencv connectedComponentsWithStats   java如何向数组中添加2D数组的数目   eclipse为什么我的Java Zork克隆不能正确循环?   java在哪里放置定制的第二个web。xml   java如何更改最近应用列表中显示的快照?   java Browser#getText()返回空字符串