This small project provides a REST API wrapper around the RenderCV tool. It accepts a YAML file (upload) plus optional JSON options and returns the generated PDF.
Endpoints
- POST /render — form upload: field
file(YAML), optional form fieldoptions(JSON string). Returns application/pdf.
Quick start
- Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt- Install RenderCV (the actual renderer). This project expects either:
- a Python package named
rendercvthat exposes arenderfunction orRenderCVclass - OR a CLI command
rendercvavailable on PATH
Install RenderCV as appropriate for your environment. This README cannot install it for you.
- Run the API server (WSGI / Flask):
Using the Flask built-in server for quick testing:
FLASK_APP=main.py flask run --host=0.0.0.0 --port=9000Or run in production with Gunicorn (WSGI):
gunicorn -w 2 -b 0.0.0.0:9000 main:app- Example request (curl):
curl -X POST \
-F "file=@cv.yml;type=text/yaml" \
-F "options={\"template\":\"modern\"}" \
http://localhost:9000/render --output out.pdfNotes
- The wrapper first attempts to import a
rendercvpython module and callrenderorRenderCV().render(). - If that fails it looks for a
rendercvCLI binary and invokes it with--inputand--outputplus converted flags for options. - The temporary files are stored in a temp directory; FileResponse is used to stream the PDF back.
If you want me to wire this to a specific version of RenderCV (showing how to call its API), provide the RenderCV import/API docs or paste the package's API surface and I will adapt the wrapper to call it directly.