https://github.com/spaciouscoder78/pramanpatram-lib
Python Wrapper Library for Pramanpatram to make certificate generation more easier and accessible
https://github.com/spaciouscoder78/pramanpatram-lib
event-certificate-generator pypi python3
Last synced: 5 days ago
JSON representation
Python Wrapper Library for Pramanpatram to make certificate generation more easier and accessible
- Host: GitHub
- URL: https://github.com/spaciouscoder78/pramanpatram-lib
- Owner: SpaciousCoder78
- License: mit
- Created: 2024-11-30T05:20:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-15T14:04:02.000Z (about 1 year ago)
- Last Synced: 2025-10-27T09:51:32.591Z (4 months ago)
- Topics: event-certificate-generator, pypi, python3
- Language: Python
- Homepage: https://pypi.org/project/pramanpatram/
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pramanpatram-lib






[](https://pepy.tech/projects/pramanpatram)
Python Wrapper Library for Pramanpatram to generate event certificates
## Supported Features
- Generating event certificates with only attendee names
## Installation
```sh
$ pip install pramanpatram
```
## Getting Started
Import the package
```py
import Pramanpatram
```
Create `.csv` file containing the Column header as `Attendees` with the Attendee names
Pass the parameters into `patram.generate_certificates()`:
Parameter
Description
csv_path
Path of CSV File
sample_path
Path of Certificate Template File
text_coords_x
X Coordinate of the text to be printed
text_coords_y
Y Coordinate of the text to be printed
text_size
Size of text to be printed
r_Value
Red Colour Value (Set to 0 for Black)
g_Value
Green Colour Value (Set to 0 for Black)
b_Value
Blue Colour Value (Set to 0 for Black)
text_width
Width of text
certificate_text
Text to be printed on the certificate (use {name} to print the name in the position)
certificate_path
Location to save certificates
Run the program to find your certificates in the path you mentioned.
## Documentation
### Available Methods
- `generate_certificates(self, csv_path, sample_path, text_coords_x, text_coords_y, text_size, r_value, g_value, b_value, text_width, certificate_text, certificate_path)`
Takes 12 inputs and generates the certificates in the specified path
Example:
```py
import os
from pramanpatram.pramanpatram import Pramanpatram
def test_generate_certificate():
csv_path = "attendees.csv"
sample_path = "sample.jpg"
text_coords_x = 110
text_coords_y = 120
text_size = 20
r_value = 0
g_value = 0
b_value = 0
text_width = 40
certificate_text = "Thanks {name}"
certificate_path = "certificates"
if not os.path.exists(csv_path):
print(f"CSV file not found at path: {csv_path}")
return
if not os.path.exists(certificate_path):
os.makedirs(certificate_path)
print(f"Created directory for certificates at path: {certificate_path}")
patram = Pramanpatram()
result = patram.generate_certificates(csv_path, sample_path, text_coords_x, text_coords_y, text_size, r_value, g_value, b_value, text_width, certificate_text, certificate_path)
print(result)
test_generate_certificate()
```