Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/traitify/traitify-python2.x
https://github.com/traitify/traitify-python2.x
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/traitify/traitify-python2.x
- Owner: traitify
- Created: 2014-04-16T03:23:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-23T17:52:08.000Z (almost 10 years ago)
- Last Synced: 2024-04-14T23:53:55.677Z (9 months ago)
- Language: Python
- Size: 157 KB
- Stars: 9
- Watchers: 13
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Traitify Python 2.x
==================```
# Import traitify
from traitify import Traitify# Initialize and Authenticate
secret_key = "your_secret_key"
traitify = Traitify(secret_key)# Get the decks
decks = traitify.get_decks()# Set deck id
traitify.deck_id = decks[0].id# Create an assessment
assessment = traitify.create_assessment()# Get an assessment
assessment = traitify.get_assessment(assessment.id)# Get an assessment's slides
slides = traitify.get_slides(assessment.id)# Upate a slide
slide = slides[0]
slide.response = True
slide.time_taken = 200
slide = traitify.update_slide(assessment.id, slide)# Bulk update slides
for slide in slides:
slide.response = True
slide.time_taken = 200
slides = traitify.update_slides(assessment.id, slides)# Get an assessment's results (personality types)
personality_types = traitify.get_personality_types(assessment.id)# Get an assessment's results (personality type traits)
personality_type = personality_types["personality_types"][0].personality_typepersonality_traits = traitify.get_personality_type_traits(assessment.id, personality_type.id)
# Get an assessment's results (personality traits)
personality_traits = traitify.get_personality_traits(assessment.id)# Get an assessment's results (personality traits raw, no dichotomy returned)
personality_traits_raw = traitify.get_personality_traits_raw(assessment.id)# Get an assessment's career matches, only applicable to the `career-deck` deck
careers = traitify.career_matches(assessment.id)# Get multiple types of results from an assessment
results = traitify.results(assessment.id, ["types", "traits", "blend"])
```# Running Tests
Tests can be run by passing in your secret key to the test script:```
python test.py your_secret_key_here
```