vyoma_download package

Submodules

vyoma_download.cli module

Console script for vyoma_download.

vyoma_download.cli.main()[source]

vyoma_download.edmingle module

Edmingle API

@author: Hrishikesh Terdalkar

class vyoma_download.edmingle.EdmingleAPI(username: str, password: str, hostname: str, api_host: str, endpoint: str = '/nuSource/api/v1', protocol: str = 'https:')[source]

Bases: object

api(path: str, data: Dict[KT, VT] = None, is_json: bool = True, method: str = 'GET') → Dict[KT, VT][source]

General API Query

path : str
API Path
data : Dict, optional
Dictionary containing GET or POST data In case of “GET”, the data is used to form the GET options string. In case of “POST”, the data is passed with the POST request. The default is None
is_json : bool, optional
Is the response a JSON object? The default is True
method : str, optional
HTTP Method (“GET” or “POST”). The default is “GET”
Dict or str
Dict, if is_json is True str, otherwise
download_material(url: str, path: str) → str[source]
get_certificates() → Dict[KT, VT][source]
get_class_resources(class_id: str) → Dict[KT, VT][source]
get_classes_period(date) → Dict[KT, VT][source]
get_course_classes(course_id: str) → Dict[KT, VT][source]
get_courses(search_pattern: str = '', tag_ids: str = '9') → Dict[KT, VT][source]
get_material(class_id: str, material_id: str) → Dict[KT, VT][source]
get_meta_all() → Dict[KT, VT][source]
get_section_resources(class_id: str, section_id: str) → Dict[KT, VT][source]
get_user_basicinfo() → Dict[KT, VT][source]
get_usermeta() → Dict[KT, VT][source]
login() → bool[source]

Login to Edmingle Platform

bool
Indicates whether the login was successful
user_agent

vyoma_download.utils module

Utility Scripts @author: Hrishikesh Terdalkar

vyoma_download.utils.pretty_name(coursename: str) → str[source]

vyoma_download.verbose_logger module

Created on Mon Jun 07 15:56:56 2021

@author: Hrishikesh Terdalkar

vyoma_download.verbose_logger.NOTICE = 25

The numeric value of the ‘notice’ log level (a number). The value of NOTICE positions the notice log level between the WARNING and INFO levels. :see also: The notice() method of the

vyoma_download.verbose_logger.VERBOSE = 15

The numeric value of the ‘verbose’ log level (a number). The value of VERBOSE positions the verbose log level between the INFO and DEBUG levels. :see also: The verbose() method of the

class vyoma_download.verbose_logger.VerboseLogger(*args, **kw)[source]

Bases: logging.Logger

Custom logger class to support the additional logging levels. This subclass of logging.Logger adds support for the additional logging methods notice(), spam(), success() and verbose(). You can use verbose_logger.install() to make VerboseLogger the default logger class.

notice(msg, *args, **kw)[source]

Log a message with level NOTICE. The arguments are interpreted as for logging.debug().

verbose(msg, *args, **kw)[source]

Log a message with level VERBOSE. The arguments are interpreted as for logging.debug().

vyoma_download.verbose_logger.add_log_level(value, name)[source]

Add a new log level to the logging module. :param value: The log level’s number (an integer). :param name: The name for the log level (a string).

vyoma_download.verbose_logger.install()[source]

Make VerboseLogger the default logger class. The install() function uses setLoggerClass() to configure VerboseLogger as the default class for all loggers created by logging.getLogger() after install() has been called. Here’s how it works: .. code-block:: python

import logging import verbose_logger verbose_logger.install() logger = logging.getLogger(__name__) # will be a VerboseLogger instance

vyoma_download.vyoma module

Vyoma Session

@author: Hrishikesh Terdalkar

class vyoma_download.vyoma.Vyoma(username: str, password: str, download_dir: str = None)[source]

Bases: vyoma_download.edmingle.EdmingleAPI

download_course(course_id: str, fetch_audio: bool = False, fetch_document: bool = True) → Dict[KT, VT][source]

Download Course Content

course_id : str
Course ID from Vyoma Edmingle Platform
fetch_audio : bool, optional
If true, the audios are downloaded. The default is True.
fetch_document : bool, optional
If true, the adocuments are downloaded. The default is True.
Dict
Complete download log
download_section(class_id: str, section_id: str) → Dict[KT, VT][source]
find_course(search_pattern: str) → str[source]
show_course_status(course_id: str)[source]

vyoma_download.vyoma module

Vyoma Session

@author: Hrishikesh Terdalkar

class vyoma_download.vyoma.Vyoma(username: str, password: str, download_dir: str = None)[source]

Bases: vyoma_download.edmingle.EdmingleAPI

download_course(course_id: str, fetch_audio: bool = False, fetch_document: bool = True) → Dict[KT, VT][source]

Download Course Content

course_id : str
Course ID from Vyoma Edmingle Platform
fetch_audio : bool, optional
If true, the audios are downloaded. The default is True.
fetch_document : bool, optional
If true, the adocuments are downloaded. The default is True.
Dict
Complete download log
download_section(class_id: str, section_id: str) → Dict[KT, VT][source]
find_course(search_pattern: str) → str[source]
show_course_status(course_id: str)[source]

Module contents

Top-level package for vyoma-download.