From 83cbe741ba23eacc6bc7dcb7401bd2c18a8c39b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:54:04 +0000 Subject: [PATCH 1/2] Initial plan From fd6f94f4d159e2498dffea4360845b612c43b513 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:57:17 +0000 Subject: [PATCH 2/2] feat: improve PyPI metadata and README for better discoverability - pyproject.toml: update description, add keywords, classifiers, and project.urls - README.md: improve tagline, add Why section, comparison table, quickstart, and use-case table Co-authored-by: erseco <1876752+erseco@users.noreply.github.com> --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 27 ++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40b6482..f03e28d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,48 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![GitHub repository](https://img.shields.io/badge/github-repository-blue)](https://github.com/erseco/python-moodle) -> **A modern Pythonic CLI and library to manage Moodle via web sessions, with full session and CAS support.** +> **Python CLI and library for automating Moodle through real web sessions, with CAS/SSO support and no custom plugins required.** + +## Why python-moodle? + +- **No API token required** — works with standard Moodle login and CAS/SSO +- **Works with web sessions** — simulates a real user browser session, no Moodle plugins needed +- **CLI for admins** and **library for automation scripts** +- **Handles courses, sections, labels, folders, assignments and SCORM** out of the box +- **Tested against Moodle 4.x and 5.x** on Python 3.8–3.13 + +### python-moodle vs. Moodle webservice wrappers + +| Capability | python-moodle | Moodle webservice wrappers | +| ----------------------------- | :-----------: | :------------------------: | +| No custom plugin required | ✅ Yes | Usually yes/no | +| Works with real web sessions | ✅ Yes | ❌ No | +| CAS/SSO support | ✅ Yes | Usually limited | +| CLI included | ✅ Yes | Often no | +| SCORM/course admin workflows | ✅ Yes | Varies | + +--- + +## 3-Minute Quickstart + +```bash +pip install python-moodle +cp .env.example .env +# Edit .env with your Moodle URL and credentials +py-moodle courses list +``` + +### Typical automation tasks + +| Task | Command / Use case | +| ----------------------------- | --------------------------------------------- | +| Bulk course creation | `py-moodle courses create` | +| SCORM upload pipelines | `py-moodle modules add scorm` | +| Content migration | Script with `list_courses` + `create_course` | +| Moodle smoke tests in CI | `pytest` + `MoodleSession` fixture | +| Admin scripting across instances | `--env` flag with multiple `.env` profiles | + +--- !!! warning "Experimental" This library is under active development. Use a test Moodle instance and back up data before running commands that create, modify, or delete content. diff --git a/pyproject.toml b/pyproject.toml index af5e297..438ff6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,10 +5,28 @@ build-backend = "setuptools.build_meta" [project] name = "python-moodle" dynamic = ["version"] -description = "Modern Moodle CLI tool" +description = "Python CLI and library to automate Moodle via web sessions, CAS/SSO, course management and SCORM uploads" readme = "README.md" authors = [{ name = "Ernesto Serrano", email = "info@ernesto.es" }] requires-python = ">=3.8" +keywords = ["moodle", "lms", "cli", "automation", "scorm", "cas", "sso", "education", "elearning", "web-scraping"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Education", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Systems Administration", +] dependencies = [ "requests", "beautifulsoup4", @@ -38,6 +56,13 @@ dev = [ "mkdocs-minify-plugin" ] +[project.urls] +Homepage = "https://github.com/erseco/python-moodle" +Documentation = "https://erseco.github.io/python-moodle/" +Repository = "https://github.com/erseco/python-moodle" +Issues = "https://github.com/erseco/python-moodle/issues" +Changelog = "https://github.com/erseco/python-moodle/releases" + [project.scripts] py-moodle = "py_moodle.cli:app"