Artifactory is a artifact repository manager which supports software packages created by different technologies.
It can also be integrated with major CI/CD and DevOps tools.
This article shows how we can communicate with artifactory using a python api client.
- Python 2.7 or higher
- libxml2/libxslt (will be deprecated in future releases)
# Debian based sudo apt-get install libxml2-dev libxslt1-dev # RedHat based sudo yum install libxml2-devel libxslt-devel
- Fire-up below command in terminal,
tagspecifies a version number.
pip install git+https://github.com/veritasos/py-artifactory.git@<tag>
- Create client instance
from artifactory import Artifactory artifactory = Artifactory( url="http://127.0.0.1:8081", username="username", password="password", )
- List users
user_list = artifactory.security.users.list()
- Get user
user = artifactory.security.users.fetch("user.name")
- Create user
user = artifactory.security.users.new() user.name = "first.last" user.password = "test" user.email = "firstname.lastname@example.org" user.groups = ["readers"] response = user.create()
- And much more ......
Artifactory Users Artifactory Groups Artifactory Permissions Artifactory Repositories Artifactory Repository Replication Artifactory LDAP Artifactory User Api Keys