为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.
要求:
- lxml
- 单击
- AGS(来自:https://bitbucket.org/databasin/python-ags)
- 7zip:必须从7Zip website手动安装
假设
- 仅支持Python2.7
- 仅在Windows上测试
- 仅支持Arcgis 10.2.x
许可证
请参阅许可证文件。