Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Installation

py-moodle requires Python 3.8+ and can be installed in several ways.
`python-moodle` requires Python 3.9+ and can be installed in several ways.

!!! note "Package name vs. command name"
The package is published as **`python-moodle`** (that's what you `pip install`
and `import py_moodle`), and the CLI is available under **two equivalent
command names**: **`py-moodle`** and **`python-moodle`**. Use whichever you
prefer — every example in these docs uses `py-moodle`.

## Method 1: PyPI (Recommended)

```bash
pip install py-moodle
pip install python-moodle
```

## Method 2: From Source
Expand All @@ -14,30 +20,32 @@ Clone the repository and install:

```bash
git clone https://github.com/erseco/python-moodle.git
cd py-moodle
cd python-moodle
pip install .
```

This makes the `py-moodle` command available system-wide.
This makes the `py-moodle` (and `python-moodle`) command available system-wide.

## Method 3: Development Installation

For development or to get the latest features:

```bash
git clone https://github.com/erseco/python-moodle.git
cd py-moodle
cd python-moodle
pip install -e .
```

The `-e` flag installs in "editable" mode, so changes to the source code are immediately available.

## Verify Installation

Test that py-moodle is properly installed:
Test that the CLI is properly installed (either command works):

```bash
py-moodle --help
# or, equivalently:
python-moodle --help
```

You should see the main help screen with available commands.
Expand Down
6 changes: 4 additions & 2 deletions docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ Get up and running with py-moodle in minutes!
- Access to a Moodle instance
- Valid Moodle credentials

## 1. Install py-moodle
## 1. Install python-moodle

```bash
pip install py-moodle
pip install python-moodle
```

The CLI is then available as either `py-moodle` or `python-moodle` (the examples use `py-moodle`).

## 2. Configure Credentials

Create a `.env` file with your Moodle credentials:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Changelog = "https://github.com/erseco/python-moodle/releases"

[project.scripts]
py-moodle = "py_moodle.cli:app"
# Alias so the command matches the distribution name; both are equivalent.
python-moodle = "py_moodle.cli:app"

[tool.setuptools.packages.find]
where = ["src"]
Expand Down