Skip to main content

Retrieving Data from ANS with Python

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.2.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

getans-0.9.2-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: getans-0.9.2.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.2.tar.gz
Algorithm Hash digest
SHA256 f6767bf610b0706d33c70a33389600eebbbc34aebbe19cd1363bf8fc88f9b8e9
MD5 e2a094dfcaca1f7ed3d62d108f61b150
BLAKE2b-256 4ddae3f1897dbb0b3912d89929642750e7fe3a9a12cf905769e8a84fe9e5ac77

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for getans-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4575acba62ed8d7a952263290c812dbd42a89583221c335f8743ec2686162639
MD5 666b5d8a921132423663407e2eaf619a
BLAKE2b-256 ab8382cd8ff5be881629a5303763c6f2c3c5a40e484fb8bf13149ba822e22888

See more details on using hashes here.

Supported by

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