如何使用python将任何文件放在人工制品中? [英] How to put any file in artifactory using python?

查看:115
本文介绍了如何使用python将任何文件放在人工制品中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,其中应该使用python语言将任何文件放入工件中.我试图在整个Internet上进行搜索,但找不到任何帮助.

I have a requirement where any file should be put in the artifact using python language. I tried to search all over internet but I couldn't find any help.

请分享代码段或可以帮助我实现此目标的内容.

Please share code snippet or something which can help me to achieve this.

这里非常感谢您的帮助.

Any help is greatly appreciated here.

推荐答案

Artifactory python模块可用于将工件上传到工件中. https://pypi.python.org/pypi/artifactory/0.1.17

Artifactory python module can be used to upload artifacts into artifactory. https://pypi.python.org/pypi/artifactory/0.1.17

以下是网站上用于将文件上传到工件的示例:

Here is an example from the website used to upload a file into artifactory:

from artifactory import ArtifactoryPath
path = ArtifactoryPath("http://my-artifactory/artifactory/libs-snapshotlocal/myapp/1.0")
path.mkdir()

path.deploy_file('./myapp-1.0.tar.gz')

这篇关于如何使用python将任何文件放在人工制品中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆