# Protect PPT Presentation Files with Python

> Encrypt PPT presentations or set write protection with Python.

Source: https://products.aspose.com/slides/python-net/protect/ppt/
Updated: 2026-07-30



## Protect a PPT Presentation with Python

[**Aspose.Slides for Python via .NET**](/slides/python-net/) provides two distinct protection mechanisms. Call `ProtectionManager.encrypt` to encrypt a PPT presentation and require a password to open it. Alternatively, call `ProtectionManager.set_write_protection` to discourage modification without encrypting the file. A user can still open a write-protected presentation and save changes to a different file.

### Encrypt a PPT Presentation - Python

```python
with slides.Presentation("presentation.ppt") as presentation:
    presentation.protection_manager.encrypt("123123")
    presentation.save("encrypted-presentation.ppt", slides.export.SaveFormat.PPT)
```

### Set Write Protection on a PPT Presentation - Python

```python
with slides.Presentation("presentation.ppt") as presentation:
    presentation.protection_manager.set_write_protection("123123")
    presentation.save("write-protected-presentation.ppt", slides.export.SaveFormat.PPT)
```

## How to Protect PPT with Python

Follow these steps to protect a PPT file.

Open the PPT file with `Presentation`.

Use `ProtectionManager.encrypt` to require a password for opening, or use `ProtectionManager.set_write_protection` to discourage changes.

Save the protected presentation as PPT with `SaveFormat.PPT`.

## Other Supported Protection Formats
