https://github.com/20scoops-cnx/encrypt-pdf-python
Encrypt file PDF with Python API
https://github.com/20scoops-cnx/encrypt-pdf-python
encryption-tool flask pypdf2
Last synced: 3 months ago
JSON representation
Encrypt file PDF with Python API
- Host: GitHub
- URL: https://github.com/20scoops-cnx/encrypt-pdf-python
- Owner: 20Scoops-CNX
- License: mit
- Created: 2019-05-28T04:14:13.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T14:35:42.000Z (9 months ago)
- Last Synced: 2025-03-24T15:42:03.747Z (4 months ago)
- Topics: encryption-tool, flask, pypdf2
- Language: Python
- Homepage:
- Size: 151 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Encrypt File PDF
[](https://github.com/python/black) [](https://cloud.docker.com/u/20scoops/repository/docker/20scoops/encrypt-file-pdf/builds) [](https://cloud.docker.com/u/20scoops/repository/docker/20scoops/encrypt-file-pdf) [](LICENSE.txt)
API for encrypt file PDF.
# Install
Make sure your uesed python3 and clone this repository
- Manual
```js
1. cd src
2. pip install -r requirements.txt
3. python app.py
```
- Docker Compose
```js
docker-compose up -d --build
```# Code Style
This project we used Black
```
pip install black
```# API
Endpoint: `/encrypt-pdf`
Method: `POST`
| Parameter | Description|
| :--- | :--- |
| file | File for encrypt (.pdf only) |
| password | your key for encrypt file |# Production
```js
// add env for production
FLASK_ENV = production
```# Recommend
If your PDF file size > 1MB. you must compress file before call API encrypt for reduces size and response time 😎