Moss.py
Python client for Moss: A System for Detecting Software Similarity
Install / Use
/learn @soachishti/Moss.pyREADME
moss.py
A Python client for Moss: A System for Detecting Software Similarity
Introduction
It is a Python interface for Moss client. It was written for AutoGrader for handling similarity in Python assignment submission.
It was written using the original bash script/documentation and its PHP dialect.
Installation
pip install mosspy
Usage
import mosspy
userid = 987654321
m = mosspy.Moss(userid, "python")
m.addBaseFile("submission/a01.py")
m.addBaseFile("submission/test_student.py")
# Submission Files
m.addFile("submission/a01-sample.py")
m.addFilesByWildcard("submission/a01-*.py")
# progress function optional, run on every file uploaded
# result is submission URL
url = m.send(lambda file_path, display_name: print('*', end='', flush=True))
print()
print ("Report Url: " + url)
# Save report file
m.saveWebPage(url, "submission/report.html")
# Download whole report locally including code diff links
mosspy.download_report(url, "submission/report/", connections=8, log_level=10, on_read=lambda url: print('*', end='', flush=True))
# log_level=logging.DEBUG (20 to disable)
# on_read function run for every downloaded file
Python Compatibility
Similar Project
- ocaml-moss OCaml client
- cl-moss Common Lisp
- moji Java version
- MOSS-PHP PHP version
- GUI for Windows GUI for Windows
License
This project is licensed under the MIT License - see the LICENSE file for details
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
