Metadata-Version: 2.1
Name: rtpy
Version: 1.4.9
Summary: Python wrapper for the JFrog Artifactory REST API.
Home-page: https://github.com/Orange-OpenSource/rtpy
License: Apache-2.0
Keywords: artifactory,rest,api,wrapper
Author: Guillaume Renault
Author-email: me@grenault.org
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: requests (>=2.18.4,<3.0.0)
Description-Content-Type: text/markdown

# rtpy

[![image](https://img.shields.io/pypi/v/rtpy.svg)](https://pypi.org/project/rtpy/)
[![image](https://img.shields.io/pypi/pyversions/rtpy.svg)](https://pypi.org/project/rtpy/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Documentation Status](https://readthedocs.org/projects/rtpy/badge/?version=latest)](https://rtpy.readthedocs.io/en/latest/?badge=latest)
[![image](https://img.shields.io/pypi/l/rtpy.svg)](https://pypi.org/project/rtpy/)

Python wrapper for the **[JFrog Artifactory REST API](https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API)**
<br/>
<br/>

## Documentation

**[https://rtpy.rtfd.io](https://rtpy.rtfd.io)**

<br/>

## Installation

```shell
$ pip install rtpy
```
<br/>

## Usage

```python
import rtpy

# instantiate a rtpy.Rtpy object
settings = {}
settings["af_url"] = "http://..."
settings["api_key"] = "123QWA..."
# settings["username"] = "my_username"
# settings["password"] = "my_password"

af = rtpy.Rtpy(settings)

# use a method
r = af.system_and_configuration.system_health_ping()
print(r)
# OK
```
<br/>

## Running the tests

### Requirements :

- Dependencies : see [tool.poetry.dependencies] and [tool.poetry.dev-dependencies] in [pyproject.toml](./pyproject.toml)
- Artifactory instance (with a valid license) running

**NEVER run the tests on a production instance!**


### Launch

- Set the following environment variables:
    - AF_TEST_URL
    - AF_TEST_USERNAME
    - AF_TEST_PASSWORD

The user must have admin privileges (it's API key will be revoked during the tests)
- Clone the repository and launch the tests using the command :

```shell
$ python -m pytest -v
```
