QualtricsAPI


NameQualtricsAPI JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://github.com/Jaseibert/QualtricsAPI
SummaryQualtricsAPI is a lightweight Python library for the Qualtrics Web API.
upload_time2023-10-24 00:38:45
maintainer
docs_urlNone
authorJeremy A. Seibert
requires_python
licenseMIT
keywords qualtrics api python research survey
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # QualtricsAPI

[![Build Status](https://travis-ci.com/Jaseibert/QualtricsAPI.svg?branch=master)](https://travis-ci.com/Jaseibert/QualtricsAPI)
![PyPI](https://img.shields.io/pypi/v/QualtricsAPI)
![PyPI - Downloads](https://img.shields.io/pypi/dm/QualtricsAPI)

**Author:** [Jeremy Seibert](https://www.jeremyseibert.com)<br/>
**License:** [MIT](https://opensource.org/licenses/MIT)<br/>
**Package Documentation:** [Documentation](https://www.qualtricsapi-pydocs.com)<br/>


[Qualtrics](https://www.qualtrics.com) is an awesome company that builds software which gives users the ability to collect online data through online surveys. This python package, exists as a wrapper on top of the Qualtrics API. This package's primary goal is to be a super convenient way for python users to ingest, or upload their data from Qualtrics to their development environment, and vice versa.

Before we continue, I want to mention two things:

First, you must have Qualtrics API access in order to use this package. Contact whomever your Qualtrics Account Manager is for further clarification on your account's access credentials.

Secondly, this package is not affiliated with Qualtrics. Thus, I the author of this package, Jeremy Seibert, is not affiliated with Qualtrics, and Qualtrics does not offer support for this package. For specific information about the Qualtrics API, you can refer to their official documentation.

# R Users
For any R users there is an equally awesome package called ["qualtRics"](https://github.com/ropensci/qualtRics) which functions in very similar ways to this package. I have tried to keep consistent with some of the methods that are used in the qualtRics package and this one, so that there is a cohesion  between the two. However, I don't believe that it supports functionality to work within the XM Contacts Data (i.e. the XMDirectory, or Mailing Lists). [CRAN]('https://cran.r-project.org/web/packages/qualtRics/index.html')

**Authors:** [Julia Silge](https://juliasilge.com/), [Jasper Ginn](http://www.jasperginn.io)<br/>
**License:** [MIT](https://opensource.org/licenses/MIT)

# Basic Usage

## Credentials Code Flow
We first create environment variables that will hold your API credentials, so you don't have to continually declare them. To do this we import the Credentials module, create and call the `qualtrics_api_credentials()`method.

```python
from QualtricsAPI.Setup import Credentials

#Call the qualtrics_api_credentials() method (Non-XM Directory Users)
Credentials().qualtrics_api_credentials(token='Your API Token',data_center='Your Data Center')

#Call the qualtrics_api_credentials() method (XM Directory Users)
Credentials().qualtrics_api_credentials(token='Your API Token',data_center='Your Data Center',directory_id='Your Directory ID')

```
This will generate environment variables that will be used to populate the HTTP headers which are necessary to make your API calls.  

## Contact Data

Now the generation of the necessary HTTP headers will be handled automatically, so we don't have to worry about it. We have 2 modules available to work with Contact Data. The first is `XMDirectory()`, and `MailingList()`. We import each as follows below.

```python
from QualtricsAPI.XM import XMDirectory
from QualtricsAPI.XM import MailingList

#Create instances of each
x = XMDirectory()
m = MailingList()
```
Once imported, there are 10 methods that are available between both modules.

1. XMDirectory() Class Methods

```python
# Creates contacts in the XMDirectory
x.create_contact_in_XM()

#Deletes a contact in the XMDirectory (use cautiously!)
x.delete_contact()

#lists Contacts in the XMDirectory
x.list_contacts_in_directory()
```

2. MailingList() Class Methods

```python
#Creates a new Mailing list for the given Qualtrics User()
m.create_list()

#Lists the Mailing Lists for the given Qualtrics User()
m.list_lists()

#Gets the Attributes of the defined Mailing List
m.get_list()

#Renames the defined Mailing List
m.rename_list()

#Deletes a defined Mailing List (use cautiously!)
m.delete_list()

#Lists the contacts in the defined Mailing List
m.list_contacts()

#Creates contacts in a Mailing List
m.create_contact_in_list()
```
## Survey Module

The `Responses()` module has two methods. Each of those methods can be called using the following methodology.

```python
from QualtricsAPI.Survey import Responses

#Get Survey Responses (Updated)
Responses().get_survey_responses(survey="<survey_id>")

#Get Survey Questions (Updated)
Responses().get_survey_questions(survey="<survey_id>")
```

# Wrap-up

Again this is currently under development so there may be reduced functionality, but I hope this helps fellow Qualtrics users to expedite their current workflow!

### Want to Contribute?

This project abides by the [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. Feedback, bug reports (and fixes!), and feature requests are welcome!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Jaseibert/QualtricsAPI",
    "name": "QualtricsAPI",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "qualtrics api python research survey",
    "author": "Jeremy A. Seibert",
    "author_email": "jeremy@seibert.industries",
    "download_url": "https://files.pythonhosted.org/packages/db/ec/370f3017c6a60cde10737c0b607365d758baa093107f16df49664e1d74a4/QualtricsAPI-0.6.1.tar.gz",
    "platform": null,
    "description": "# QualtricsAPI\n\n[![Build Status](https://travis-ci.com/Jaseibert/QualtricsAPI.svg?branch=master)](https://travis-ci.com/Jaseibert/QualtricsAPI)\n![PyPI](https://img.shields.io/pypi/v/QualtricsAPI)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/QualtricsAPI)\n\n**Author:** [Jeremy Seibert](https://www.jeremyseibert.com)<br/>\n**License:** [MIT](https://opensource.org/licenses/MIT)<br/>\n**Package Documentation:** [Documentation](https://www.qualtricsapi-pydocs.com)<br/>\n\n\n[Qualtrics](https://www.qualtrics.com) is an awesome company that builds software which gives users the ability to collect online data through online surveys. This python package, exists as a wrapper on top of the Qualtrics API. This package's primary goal is to be a super convenient way for python users to ingest, or upload their data from Qualtrics to their development environment, and vice versa.\n\nBefore we continue, I want to mention two things:\n\nFirst, you must have Qualtrics API access in order to use this package. Contact whomever your Qualtrics Account Manager is for further clarification on your account's access credentials.\n\nSecondly, this package is not affiliated with Qualtrics. Thus, I the author of this package, Jeremy Seibert, is not affiliated with Qualtrics, and Qualtrics does not offer support for this package. For specific information about the Qualtrics API, you can refer to their official documentation.\n\n# R Users\nFor any R users there is an equally awesome package called [\"qualtRics\"](https://github.com/ropensci/qualtRics) which functions in very similar ways to this package. I have tried to keep consistent with some of the methods that are used in the qualtRics package and this one, so that there is a cohesion  between the two. However, I don't believe that it supports functionality to work within the XM Contacts Data (i.e. the XMDirectory, or Mailing Lists). [CRAN]('https://cran.r-project.org/web/packages/qualtRics/index.html')\n\n**Authors:** [Julia Silge](https://juliasilge.com/), [Jasper Ginn](http://www.jasperginn.io)<br/>\n**License:** [MIT](https://opensource.org/licenses/MIT)\n\n# Basic Usage\n\n## Credentials Code Flow\nWe first create environment variables that will hold your API credentials, so you don't have to continually declare them. To do this we import the Credentials module, create and call the `qualtrics_api_credentials()`method.\n\n```python\nfrom QualtricsAPI.Setup import Credentials\n\n#Call the qualtrics_api_credentials() method (Non-XM Directory Users)\nCredentials().qualtrics_api_credentials(token='Your API Token',data_center='Your Data Center')\n\n#Call the qualtrics_api_credentials() method (XM Directory Users)\nCredentials().qualtrics_api_credentials(token='Your API Token',data_center='Your Data Center',directory_id='Your Directory ID')\n\n```\nThis will generate environment variables that will be used to populate the HTTP headers which are necessary to make your API calls.  \n\n## Contact Data\n\nNow the generation of the necessary HTTP headers will be handled automatically, so we don't have to worry about it. We have 2 modules available to work with Contact Data. The first is `XMDirectory()`, and `MailingList()`. We import each as follows below.\n\n```python\nfrom QualtricsAPI.XM import XMDirectory\nfrom QualtricsAPI.XM import MailingList\n\n#Create instances of each\nx = XMDirectory()\nm = MailingList()\n```\nOnce imported, there are 10 methods that are available between both modules.\n\n1. XMDirectory() Class Methods\n\n```python\n# Creates contacts in the XMDirectory\nx.create_contact_in_XM()\n\n#Deletes a contact in the XMDirectory (use cautiously!)\nx.delete_contact()\n\n#lists Contacts in the XMDirectory\nx.list_contacts_in_directory()\n```\n\n2. MailingList() Class Methods\n\n```python\n#Creates a new Mailing list for the given Qualtrics User()\nm.create_list()\n\n#Lists the Mailing Lists for the given Qualtrics User()\nm.list_lists()\n\n#Gets the Attributes of the defined Mailing List\nm.get_list()\n\n#Renames the defined Mailing List\nm.rename_list()\n\n#Deletes a defined Mailing List (use cautiously!)\nm.delete_list()\n\n#Lists the contacts in the defined Mailing List\nm.list_contacts()\n\n#Creates contacts in a Mailing List\nm.create_contact_in_list()\n```\n## Survey Module\n\nThe `Responses()` module has two methods. Each of those methods can be called using the following methodology.\n\n```python\nfrom QualtricsAPI.Survey import Responses\n\n#Get Survey Responses (Updated)\nResponses().get_survey_responses(survey=\"<survey_id>\")\n\n#Get Survey Questions (Updated)\nResponses().get_survey_questions(survey=\"<survey_id>\")\n```\n\n# Wrap-up\n\nAgain this is currently under development so there may be reduced functionality, but I hope this helps fellow Qualtrics users to expedite their current workflow!\n\n### Want to Contribute?\n\nThis project abides by the [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms. Feedback, bug reports (and fixes!), and feature requests are welcome!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "QualtricsAPI is a lightweight Python library for the Qualtrics Web API.",
    "version": "0.6.1",
    "project_urls": {
        "Homepage": "https://github.com/Jaseibert/QualtricsAPI"
    },
    "split_keywords": [
        "qualtrics",
        "api",
        "python",
        "research",
        "survey"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c351bffaf0cad03ff60507bc16de3f9086e263f17cd2853ac70a9fbe16faf81",
                "md5": "225d8bd098ba3bf3b8c23c9915405501",
                "sha256": "f58564d668dba899fb5e29de7de9480c520ca1c9bc4c217309006a646cc19241"
            },
            "downloads": -1,
            "filename": "QualtricsAPI-0.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "225d8bd098ba3bf3b8c23c9915405501",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 32131,
            "upload_time": "2023-10-24T00:38:43",
            "upload_time_iso_8601": "2023-10-24T00:38:43.904447Z",
            "url": "https://files.pythonhosted.org/packages/3c/35/1bffaf0cad03ff60507bc16de3f9086e263f17cd2853ac70a9fbe16faf81/QualtricsAPI-0.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbec370f3017c6a60cde10737c0b607365d758baa093107f16df49664e1d74a4",
                "md5": "d2b4997d6cdcbe9143670801f83383ab",
                "sha256": "f12647809116ed35ff17d1a401840f9caa082250ace843fdcbffa8007d70c667"
            },
            "downloads": -1,
            "filename": "QualtricsAPI-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d2b4997d6cdcbe9143670801f83383ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27033,
            "upload_time": "2023-10-24T00:38:45",
            "upload_time_iso_8601": "2023-10-24T00:38:45.725051Z",
            "url": "https://files.pythonhosted.org/packages/db/ec/370f3017c6a60cde10737c0b607365d758baa093107f16df49664e1d74a4/QualtricsAPI-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-24 00:38:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Jaseibert",
    "github_project": "QualtricsAPI",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "qualtricsapi"
}
        
Elapsed time: 0.13375s