Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 9 hours 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-03T03:26:09.000Z (about 1 year ago)
- Last Synced: 2024-05-20T21:51:27.142Z (6 months ago)
- Topics: encryption-tool, flask, pypdf2
- Language: Python
- Homepage:
- Size: 149 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
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
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black) [![Docker Build](https://img.shields.io/docker/cloud/build/20scoops/encrypt-file-pdf.svg?color=black)](https://cloud.docker.com/u/20scoops/repository/docker/20scoops/encrypt-file-pdf/builds) [![Download](https://img.shields.io/docker/pulls/20scoops/encrypt-file-pdf.svg?color=black&logoColor=black)](https://cloud.docker.com/u/20scoops/repository/docker/20scoops/encrypt-file-pdf) [![License: MIT](https://img.shields.io/badge/License-MIT-black.svg)](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 😎