Skip to main content

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

License

This project is licensed under the MIT License - see the LICENSE file for details

Release files for mosspy 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mosspy 1.0.9
File Interpreter ABI Platform
mosspy-1.0.9-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / mosspy-1.0.9-py2.py3-none-any.whl

Download URL mosspy-1.0.9-py2.py3-none-any.whl
Size 5.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7ebae3fc2e84f70a80796fee640fd933511e9da9b5e15920e60e298bb9a785ad
BLAKE2b-256 checksum
How to use checksums
d1adda23a5299944b82f4e489c2523dcd361cf34b5218cc1262793b6d43d9e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

1.0.9 This release

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6.1

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page