Metadata-Version: 2.3
Name: qualtrics-helper
Version: 0.0.1rc3
Summary: Python library for interacting with the Qualtrics REST API
License: MIT License
         
         Copyright (c) 2026 Orange
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Requires-Dist: pandas>=2.3.3
Requires-Dist: requests
Requires-Dist: oauthlib
Requires-Dist: requests-oauthlib
Requires-Dist: typing-extensions
Requires-Dist: dotenv
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# qualtrics-helper

Python library for interacting with the Qualtrics REST API.


## How to install as a package and configure

```
pip install qualtrics-helper
```

You can authentificate with either an API Token or an clientId and clientSecret (for OAuth2), with a scope
```
from qualtrics_helper import Qualtrics; 
qualtrics_instance = Qualtrics(qualtrics_server='yul1',api_token=<token>); 
print(qualtrics_instance.users.who_am_i())
```
or 
```
from qualtrics_helper import Qualtrics; 
qualtrics_instance = Qualtrics(
    qualtrics_server='yul1',
    client_id=<client_id>,
    client_secret=<client_secret>,
    scope=['manage:all']
); 
print(qualtrics_instance.users.who_am_i())
```

You can also set up environement variables for authentification, like :
- QUALTRICS_API_TOKEN, 
- QUALTRICS_CLIENT_ID,
- QUALTRICS_CLIENT_SECRET,
- QUALTRICS_LOG_LEVEL,
- QUALTRICS_REQUESTS_TIMEOUT,
- QUALTRICS_SERVER,
- QUALTRICS_SCOPE

Then you will not need to specify such values into your code
```
from qualtrics_helper import Qualtrics; 
qualtrics_instance = Qualtrics(); 
print(qualtrics_instance.users.who_am_i())
```

## How to install locally and configure

Clone this repository

You can set up environement variables (example for authentification). See file `config.py` for the list of all available variables and their default values.

## How to use locally

```
make setup
uv run python scripts/my_script.py
```
or 
```
make setup
uv run python -c "<python code>"
```

## Example:

```
make setup
uv run python -c """
from qualtrics_helper import Qualtrics; 
qualtrics_instance = Qualtrics(); 
print(qualtrics_instance.users.who_am_i())
"""
```