A Python to Artifactory interface
Project description
# Python interface library for Jfrog Artifactory #
[![Build Status](https://travis-ci.org/Parallels/artifactory.svg?branch=master)](https://travis-ci.org/Parallels/artifactory)
This module is intended to serve as a logical descendant of [pathlib](https://docs.python.org/3/library/pathlib.html), a Python 3 module for object-oriented path manipulations. As such, it implements everything as closely as possible to the origin with few exceptions, such as stat().
# Usage Examples #
Getting directory listing:
```python
from artifactory import ArtifactoryPath
path = ArtifactoryPath("http://repo.jfrog.org/artifactory/gradle-ivy-local")
for p in path.iterdir():
print p
```
Find all .gz files in current dir, recursively:
```python
from artifactory import ArtifactoryPath
path = ArtifactoryPath("http://repo.jfrog.org/artifactory/distributions/org/")
for p in path.glob("**/*.gz"):
print p
```
Download artifact to a local filesystem:
```python
from artifactory import ArtifactoryPath
path = ArtifactoryPath("http://repo.jfrog.org/artifactory/distributions/org/apache/tomcat/apache-tomcat-7.0.11.tar.gz")
with path.open() as fd:
with open("tomcat.tar.gz", "w") as out:
out.write(fd.read())
```
[![Build Status](https://travis-ci.org/Parallels/artifactory.svg?branch=master)](https://travis-ci.org/Parallels/artifactory)
This module is intended to serve as a logical descendant of [pathlib](https://docs.python.org/3/library/pathlib.html), a Python 3 module for object-oriented path manipulations. As such, it implements everything as closely as possible to the origin with few exceptions, such as stat().
# Usage Examples #
Getting directory listing:
```python
from artifactory import ArtifactoryPath
path = ArtifactoryPath("http://repo.jfrog.org/artifactory/gradle-ivy-local")
for p in path.iterdir():
print p
```
Find all .gz files in current dir, recursively:
```python
from artifactory import ArtifactoryPath
path = ArtifactoryPath("http://repo.jfrog.org/artifactory/distributions/org/")
for p in path.glob("**/*.gz"):
print p
```
Download artifact to a local filesystem:
```python
from artifactory import ArtifactoryPath
path = ArtifactoryPath("http://repo.jfrog.org/artifactory/distributions/org/apache/tomcat/apache-tomcat-7.0.11.tar.gz")
with path.open() as fd:
with open("tomcat.tar.gz", "w") as out:
out.write(fd.read())
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
artifactory-0.1.tar.gz
(6.8 kB
view details)
File details
Details for the file artifactory-0.1.tar.gz
.
File metadata
- Download URL: artifactory-0.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32659bd527583f9fc77c004ffa4825d9d9e8ed279adfe66f7141ea4da00e02ec |
|
MD5 | 5cdb26f51ce64b34a3793dac2f42182a |
|
BLAKE2b-256 | e8b1d2d89f8285fb9554b51782360116fa9b00240886c439051a25c990317d6e |