otreeutils | Facilitate oTree experiment implementation with extensions
kandi X-RAY | otreeutils Summary
kandi X-RAY | otreeutils Summary
otreeutils is a Python library. otreeutils has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install otreeutils' or download it from GitHub, PyPI.
It's best to have a look at the (documented) examples to see how to use the API. A common page extension to oTree's default Page class. All other page classes in otreeutils extend this class. Allows to define a custom page URL via custom_name_in_url, timeout warnings, a page title and provides a template variable debug with which you can toggle debug code in your templates / JavaScript parts. The template variable debug (integer – 0 or 1) is toggled using an additional APPS_DEBUG variable in settings.py. See the settings.py of this repository. This is quite useful for example in order to fill in the correct questions on a page with understanding questions automatically in a debug session (so that it is easier to click through the pages).
It's best to have a look at the (documented) examples to see how to use the API. A common page extension to oTree's default Page class. All other page classes in otreeutils extend this class. Allows to define a custom page URL via custom_name_in_url, timeout warnings, a page title and provides a template variable debug with which you can toggle debug code in your templates / JavaScript parts. The template variable debug (integer – 0 or 1) is toggled using an additional APPS_DEBUG variable in settings.py. See the settings.py of this repository. This is quite useful for example in order to fill in the correct questions on a page with understanding questions automatically in a debug session (so that it is easier to click through the pages).
Support
Quality
Security
License
Reuse
Support
otreeutils has a low active ecosystem.
It has 14 star(s) with 8 fork(s). There are 2 watchers for this library.
It had no major release in the last 12 months.
There are 0 open issues and 2 have been closed. There are no pull requests.
It has a neutral sentiment in the developer community.
The latest version of otreeutils is 0.10.0
Quality
otreeutils has 0 bugs and 0 code smells.
Security
otreeutils has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
otreeutils code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
otreeutils is licensed under the Apache-2.0 License. This license is Permissive.
Permissive licenses have the least restrictions, and you can use them in most projects.
Reuse
otreeutils releases are not available. You will need to build from source code and install.
Deployable package is available in PyPI.
Build file is available. You can build the component from source.
Installation instructions, examples and code snippets are available.
It has 2708 lines of code, 78 functions and 45 files.
It has low code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA
kandi has reviewed otreeutils and discovered the below as its top functions. This is intended to give you an instant insight into otreeutils implemented functionality, and help decide if they suit your requirements.
- Gets the hierarchy of the given apps
- Get the hierarchy of the given app
- Handle GET request
- Return a dictionary mapping custom models to custom models
- Generate a list of rows for the given players
- Get rows for custom export
- Set up survey pages
- Setup survey
- Creates template variables
- Returns a list of choices for a field
- Calculates total cost for each page
- Returns a model for purchase form
- Generates a wizard table
- Generate a widget for the given labels
- Set the context of the survey
- Return the varset for the template
- This function is called before the next round
- Returns a list of template variables for the template
- Return the vars for a template
- Return the vars for a template
- Generates a field for the given labels
- Return context data
- This method is called when a new page is created
- Create a player model for a survey
- Return template name
Get all kandi verified functions for this library.
otreeutils Key Features
No Key Features are available at this moment for otreeutils.
otreeutils Examples and Code Snippets
Copy
from otreeutils.surveys import create_player_model_for_survey
GENDER_CHOICES = (
('female', 'Female'),
('male', 'Male'),
('no_answer', 'Prefer not to answer'),
)
SURVEY_DEFINITIONS = {
'SurveyPage1': {
'page_title': 'Surve
Copy
from otree.db.models import Model, ForeignKey # import base Model class and ForeignKey
# ...
class FruitOffer(Model):
amount = models.IntegerField(label='Amount', min=0, initial=0)
# ... more fields here ...
seller = ForeignKey(Play
Copy
import sys
from otreeutils import scripts # this is the most import line and must be included at the beginning
if len(sys.argv) != 2:
print('call this script with a single argument: python %s ' % sys.argv[0])
exit(1)
output_file = sys.a
Community Discussions
No Community Discussions are available at this moment for otreeutils.Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install otreeutils
In order to use otreeutils in your experiment implementation, you only need to do the following things:.
Either install the package from PyPI via pip (pip install otreeutils) or download/clone this github repository and copy the otreeutils folder to your oTree experiment directory.
Edit your settings.py so that you add "otreeutils" to your INSTALLED_APPS list. Don't forget this, otherwise the required templates and static files cannot be loaded correctly!
Either install the package from PyPI via pip (pip install otreeutils) or download/clone this github repository and copy the otreeutils folder to your oTree experiment directory.
Edit your settings.py so that you add "otreeutils" to your INSTALLED_APPS list. Don't forget this, otherwise the required templates and static files cannot be loaded correctly!
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page