Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

aiken

A short description for your project.

Published20 Sept 2017
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation
.. These are the Travis-CI and Coveralls badges for your repository. Replace
   your *github_repository* and uncomment these lines by removing the leading
   two dots.

.. .. image:: https://travis-ci.org/*github_repository*.svg?branch=master
    :target: https://travis-ci.org/*github_repository*

.. .. image:: https://coveralls.io/repos/github/*github_repository*/badge.svg?branch=master
    :target: https://coveralls.io/github/*github_repository*?branch=master


This project is a Python parser for the Aiken question format used in Moodle. 
Aiken is a very simple format to represent multiple choice questions (https://docs.moodle.org/24/en/Aiken_format)
It accept two very similar syntaxes::

    What is the correct answer to this question?
    A. Is it this one?
    B. Maybe this answer?
    C. Possibly this one?
    D. Must be this one!
    ANSWER: D

And this::

    Which LMS has the most quiz import formats?
    A) Moodle
    B) ATutor
    C) Claroline
    D) Blackboard
    E) WebCT
    F) Ilias
    ANSWER: A 


Usage
=====

The aiken module simply expose the `load` and `dump` functions that respectively 
parse a question file and convert a parsed question object back to code. Let us
parse a question string:

>>> import aiken
>>> question = aiken.load("""
... Is this a valid Aiken Question?
... A. Yes
... B. No
... ANSWER: A
... """)
>>> question.options
['Yes', 'No']

Now, we make some changes and convert it back to a string of code:

>>> question.options.append('Who knows?')
>>> print(aiken.dump(question))
Is this a valid Aiken Question?
A. Yes
B. No
C. Who knows?
ANSWER: A

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
aiken-0.1.0.tar.gz

sdist · 4.45 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:06 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:e1f26cf379d4c3202c46c195426c02f2fd2afdd402b16b2bc53be202867cc18b

Other collected versions

View all collected versions →