A robust, privacy-focused Python application that extracts structured data from PDF resumes using Local AI (Llama 3) and archives it directly into a MySQL database.
- Local AI Processing: Uses Ollama (Llama 3) to parse resumes entirely offline. No data leaves your machine.
- Smart Text Extraction: Utilizes
pdfplumberwith layout awareness to correctly read complex multi-column resumes. - Database Integration: Automatically stores candidates in a MySQL database.
- Interactive UI: Native file selection dialog for easy PDF picking.
Before running the tool, ensure you have the following installed:
- Python 3.10+
- MySQL Server (8.0 or higher)
- Ollama: Download here
- Pull the model:
ollama pull llama3
- Pull the model:
-
Clone the Repository (or download the files)
git clone [https://github.com/yourusername/resume-parser.git](https://github.com/yourusername/resume-parser.git) cd resume-parser -
Install Python Libraries
pip install ollama pdfplumber mysql-connector-python tkinter
You must create the database and tables before running the Python script.
- Log in to MySQL (via Command Prompt or Workbench).
- Create the Database:
CREATE DATABASE empl_database;
- Import the Schema:
Save the provided SQL code into a file named
tablestr.sqland import it:mysql -u root -p empl_database < tablestr.sql
-
Run the Application:
python main.py
-
Enter Password: The script will securely ask for your MySQL root password.
Enter your MySQL Root Password: [Hidden Input] -
Select a Resume: A file window will pop up. Select any PDF resume.
-
Review & Save:
- The AI will print the extracted JSON data to the console.
- You will be asked:
Store in Database? (y/n): - Type
yto save the candidate to MySQL.
main.py: The core application code.tablestr.sql: The SQL script to create the database tables.README.md: Project documentation.requirements.txt: List of dependencies.
- Error:
Access denied for user 'root'@'localhost': You entered the wrong MySQL password at the start. Restart the script. - Error:
1045 (28000): Same as above, invalid password. - Error reading PDF: Ensure the file is a valid PDF and not an image-based scan (OCR is not currently supported).
- Dates saving as NULL: If the AI cannot find a date or the date format is extremely unusual, the script defaults to
NULLto prevent database errors.
This tool uses Local LLMs via Ollama. No resume data is sent to OpenAI, Google, or any cloud API. Your data remains 100% private on your local machine.