Skip to main content

Retrieving Data from ANS for DPECS

Project description

getANS

GitHub license PyPI

Retrieving Data from ANS with Python

Released under the MIT License

Oliver Lindemann, Erasmus University Rotterdam, NL

--

Installing via pip

python -m pip install getans

Dependencies

Python 3.10 and the following libraries:

  • pandas (>=2.2)
  • appdirs (>=1.4)
  • requests (>=2.32)

getANS Command line interface

call: python -m getANS

usage: getANS [-h] [--usage] [--token] [--new [DATABASE_NAME]] [--exercises] [--results] [--submissions] [--courses] [--grades] [--assignments]
                  [--file [EXCEL_FILE]]
                  [DATABASE]

Retrieving Data from ANS.

positional arguments:
  DATABASE              database file

options:
  -h, --help            show this help message and exit
  --usage               show typical workflow
  --token               setting access token

Retrieve / Download:
  --new [DATABASE_NAME], -n [DATABASE_NAME]
                        initiate new database
  --results             retrieve results
  --exercises           retrieve exercises & questions
  --submissions         retrieve submissions

Show / Export:
  --courses, -c         list all courses
  --grades, -g          list all grades
  --assignments, -a     overview all assignments
  --file [EXCEL_FILE], -f [EXCEL_FILE]
                        export what is shown to excel

(c) Oliver Lindemann

Typical workflow

Ensure that you have set an access token (call '--token'). A new token can be generated via the ANS website: https://ans.app/users/tokens

  1. Initiate new database: --new mydatabase and follow instructions

  2. Download grades (results): mydatabase --results

  3. Download all questions (exercises): mydatabase --exercises (that might take a while!)

  4. Show assignment overview: mydatabase -a

  5. Show grades: mydatabase -r

    To save assignments, courses or grades add --file myexcelfile.xlsx to a show command


getANS Python library

API documentation is work in progress

see demo script getans_demo.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getans-0.9.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

getans-0.9-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file getans-0.9.tar.gz.

File metadata

  • Download URL: getans-0.9.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for getans-0.9.tar.gz
Algorithm Hash digest
SHA256 657e7efe55d81a2a88a4ee3297a8e89920040ee36481ebc6bd027e974fe076f8
MD5 91efa9675a06c94fc3aa74bc879d98be
BLAKE2b-256 857a2d1b1a0792703aad666bec93ed47d0a2bc95854dffa576fe0e57f97e38c9

See more details on using hashes here.

File details

Details for the file getans-0.9-py3-none-any.whl.

File metadata

  • Download URL: getans-0.9-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for getans-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d59363f00c69d8c9bc3699f4ee8de3eeb44d37998faff253d43bc89e3b91824f
MD5 8b6285f991968f3bcdbedc47bcaab285
BLAKE2b-256 f030639e6934a5b7773ae910b8ee4c03d02a45095c2255a1de48ca5ae18b8aec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page