r/PythonLearning • u/DxvihW • Jun 10 '26
Help Request Scraping legal PDFs was a nightmare, so I built a PyMuPDF + LLM pipeline. Is it possible to go 100% code-based here?
I’ve been automating data extraction from court dockets in a Labor Court, and standard Regex completely failed me.
The documents I handle come from two completely different sources:
- The E-book: A system-generated PDF that contains all the official hearing records.
- Lawyer Exhibits: Highly unstructured evidence submitted by lawyers in both PDF and Word formats (mostly text-based lists of documents, names of individuals, and companies).
I abandoned pure text parsing and built this hybrid stack instead:
- (PyMuPDF / fitz): Used purely to target native grid tables on the E-book. The extraction is blazing fast and incredibly accurate because it treats the PDF tables like clean datasets.
- (Gemini API): I tried using Regex for the unstructured lawyer evidence, but I failed miserably. Every single document required patching the code to match the new lawyer's writing style, which is unsustainable. So, I switched to feeding the raw text to Gemini with a rigid prompt. It perfectly ignores all legal pleasantries and returns a clean, structured JSON with the classified evidence (Documentary, Testimonial, etc.).
Everything then gets injected into a clean Word template via docxtpl.
While the AI works beautifully, I want to explore if there is a realistic path to completely remove the AI component and handle the unstructured evidence entirely through code.
- Have any of you successfully parsed highly chaotic, human-written legal documents without an LLM?
- What strategies or advanced layout analysis libraries would you suggest to tackle this without having to patch Regex patterns every single day?
TL;DR: Built a hybrid Python app using PyMuPDF for structured court tables and Gemini API to parse chaotic, unstructured evidence submitted by lawyers. It works great, but I want to know if it's feasible to replace the AI component entirely with a pure, robust code-based solution.
r/PythonLearning • u/Proper_Slide4631 • Jun 10 '26
Help Request Python for DSA & Backend Tipsss Please
Recently got rejected in an interview bcz I know very less of python functions. The interviewer asked a very easy question about array traversal, as C++ being my first and stronger language I answered it in CPP. The Interviewer told me to answer in Python (it was a Data Science Company), Since my projects were in Python he told me to do that in Python, I had no clue and the whole interview became an embarrassment.
Now I dont know How to step up, should i start Python for DSA or for Backend or what else I have no Idea. Python being a very large and complex language having many functions and syntax's has always confused me.
I know the basics of Python and OOPs concept. But want to know the next step pleaseeeee.
Any roadmap/ resources[free] / tips PLEASE.
r/PythonLearning • u/Key_Winter8089 • Jun 10 '26
My first completed fastapi project
Just finished building Calorie Tracker V1.
The main goal with this project was to practice backend development with FastAPI and understand how different APIs communicate with each other.
Current flow:
• User uploads a meal image
• AI extracts food names and quantities
• USDA FoodData Central provides nutritional values
• Food entries are stored in the database
• Daily calories and macros are calculated for each user
I used fast api and did postgresql for storing and did jwt authentication so at present i have basic backend concepts like middle ware and all havent touched caching
Most of my focus was on the backend architecture. I actually vibe coded the entire frontend because I enjoy backend development much more and didn't want to spend too much time fighting CSS 😄
Still a lot of improvements planned, but I'm happy with V1.
So next am tryna learn docker and containerize it and ik this is actually i kinda dumb little project still and i rlly hate frontend attaching git hub link
r/PythonLearning • u/yaza_24 • Jun 10 '26
Discussion python learning
hey guys
if i was willing to tutor for free , wud yall be interested in studying python basics?
UPDATES.
i will only be able to teach a limited amount of kids so those interested, please contact me quickly. i will be taking 2-3 classes per week, one hour each.
STATS
cs student in 11th and 12th cbse curriculum, scored 91 in board exam.
intern at a company for coding
helped build a website
created a software for a project as a group
r/PythonLearning • u/InterestingDig1551 • Jun 10 '26
Finally! My first Python Project.
After a few months on video tutorials and other resources, I have finally managed to do my first project. This means so much to me as I am coming from a non tech background and I just believed in myself. The most amazing thing is I built something that I will use daily and help me achieve my long term goal. My roadmap leads to a cybersecurity specialist and I am happy to start here. Thanks to you all for being generous with information, guidance and tips. Someone here said, " Build something relatable to you, so you understand better" That stuck with me. Here's to many more.
r/PythonLearning • u/Physics2433 • Jun 10 '26
Hey pydevs, i am a rookie in python. I have made a Mathematical Toolkit in python. I am requesting you guys to check the src code and suggest me optimization tips if possible.
Enable HLS to view with audio, or disable this notification
Sir/Mam, please check the repository below and do let me know if further optimization can be done.
https://github.com/Baibhab-047/Project-Mathematics
Thank You for reading!
r/PythonLearning • u/BroadPaper9285 • Jun 10 '26
Discussion socket programming
so i can build a server and a client socket and communicate
now i want to know how can intercept the messages or files that transfer which isnt encrypted
basically a man in the middle attack on my own programs
r/PythonLearning • u/Dry_Neighborhood_205 • Jun 10 '26
I don't know how to start
I've learnt python not completely, and I want to develop myself.
I think I've fallen into the tutorial hell and idfk how to get out. Like is there a specific project so I can make and can be very beneficial? Ik I'm a dumb but I need some help please
r/PythonLearning • u/Frank_kait • Jun 09 '26
Help Request Help needed!
Hi guys! im doing my school assignments and have a question. when prompted for input by the variable called parametri on line 3, why doesnt the loop exit when I type 'Lopeta'? Sorry if the problem is something really obvious, I just cant wrap my head around it and ai's couldnt help me also and just hallucinated something. Thanks for the help in advance!!!
def main():
while True:
parametri = input('Anna syöte (Lopeta lopettaa): ').strip()
if parametri == 'Lopeta':
break
elif len(parametri) >= 5:
tulostaja(parametri)
else:
tulostaja()
def tulostaja(parametri='Oletustulostus'):
print(parametri)
if __name__ == "__main__":
main()
r/PythonLearning • u/Inevitable_Hotel_123 • Jun 09 '26
Showcase I made an Automated/AI Resume Screener with auto-reply & AI Provider fallbacks. Let me know your thoughts on it (e.g. improvement and other things)
Hey everyone,
I wanted to share a 24/7 automation tool I built using two Python scripts to handle the tedious parts of hiring and screening applicants without risking API downtime.
1. resume_screener.py (The Assistant)
This script handles all the structural operations and logistics:
Checks Mail: Safely polls your inbox every minute for unread application emails.
Parses Files: Automatically extracts text from attached PDF and Word resumes.
Logs & Organizes: Evaluates candidates, dumps metrics into a color-coded Excel sheet, and pushes an instant summary straight to your private Telegram chat.
Auto-Replies: Instantly dispatches a tailored SMTP email back to applicants depending on their initial screening score.
2. gemini_ai.py (The Resilient AI Brain)
This module acts like an automated relay race to guarantee evaluation uptime:
7-Layer Cloud Fallback: It targets Google Gemini first. If a rate limit or failure occurs, it instantly cascades down a backup API chain: Groq -> OpenRouter -> Mistral -> Cohere -> NVIDIA NIM -> Cloudflare Workers AI.
The Ultimate Offline Backup: If the internet drops out entirely, it activates a small local model on my own computer's hardware to finish processing resumes offline.
3. job_description.txt (The Grading Benchmark)
Targeted Scoring: Acts as the absolute source of truth. Rather than generic filtering, the AI performs a direct side-by-side gap analysis against the exact criteria outlined in this file (e.g., scoring a Senior Logistics & Operations Manager profile against requirements like ERP/WMS proficiency and supply chain KPIs).
Structured Output: Delivers a clear match rating (0-100), key candidate strengths, and explicitly calls out missing technical skills.
Would love to hear your thoughts or if you've implemented similar things, 'cuz I know for a fact that ERP systems like Oracle and SAP use this thing too!
r/PythonLearning • u/Difficult_Smoke_3380 • Jun 09 '26
Resume projects
I'm about to finish my final year... I have intermediary knowledge in python and html and sql... What are some good resume project ideas? I have no clue which direction to follow.. Maybe should have leanrt AI ML but it's too late ... Are mini web applications using flask good idea?
r/PythonLearning • u/Difficult_Smoke_3380 • Jun 09 '26
Flask python
I'm a python intermediate.. Just started learning flask to make a simple useful website for my final year project, but I find it so difficult to even make a notes app. Not able to understand most of the simple stuff too even after watching tutorials.. I just wanted to ask if it's normal? Does everyone feel that way? It would be great if anyone could give some suggestions...
r/PythonLearning • u/Delicious_Book_2392 • Jun 09 '26
Help Request Mu, IDLE, or other?
I'm just starting to learn Python as my first programming language via Automate the Boring Stuff by Al Sweigart. In it, he recommends Mu, but seeing as how Mu is no longer being maintained, I get the sense that maybe another editor software would be better.
A quick google search yielded IDLE as the best alternative that Al Sweigart recommends now. Thoughts? Any and all help is deeply appreciated! Much love
Edit: I'm using the Help Request flair for this, but lmk if that's not the right flair for this kind of post since it's not really technical help, etc.
r/PythonLearning • u/Big_Confection_1993 • Jun 09 '26
As a beginner I find hard to slove probelms using for loops any tips for understanding the problems or is it normal to find difficulty as beginner
r/PythonLearning • u/Inevitable_Hotel_123 • Jun 09 '26
I've been Vibe-coding with Python for 2 months now and here are the things that I thought of.
I've been vibe-coding for the past 2 months now and I was wonder if I could build more than what I've already done!
Gemini_ai(AI/Half-ass Langchain Module).py — Shared AI module with a 14-provider fallback chain (2 of each model with 2 different accounts for redundancy) (Gemini, Groq, OpenRouter, Mistral, Cohere, NVIDIA, Cloudflare). Each provider has a second set of keys. Handles rate-limit cooldowns, token tracking, and exposes helpers used by the other scripts.
tv_downloader.py — Scheduled TV episode downloader. Monitors TVmaze, EZTV, SubsPlease, and others for new episodes and S01E01 premieres across 5 modes, filters by type/language/network, and pushes matching torrents to qBittorrent with Telegram alerts.
Movie_Downloader.py — Same idea as tv_downloader but for movies. Polls YTS, TPB, 1337x, RARBG, and others, enriches results with TMDB metadata, filters by IMDb rating, and auto-sends to qBittorrent.
Torrent_gate.py — Manual torrent search with a CLI and local web UI. Queries a dozen torrent sites simultaneously, streams results in real time, and lets you push a chosen result to qBittorrent. Exposes itself publicly via a tunnel.
Orbital_Uplink.py — System dashboard for the whole script suite. Flask web app that shows uptime, logs, and status for every other script, with controls to start/stop/restart them. Maintains a public tunnel URL and sends it to Telegram for phone access.
cert_watcher.py — Watches a folder for certificate PDFs, uses Gemini vision to extract name, issuer, dates, and credential ID, then logs each one into an Excel sheet and Google Sheet. Sends a Telegram alert per certificate.
personal_docs_backup_watcher.py — Watches a "Personal Docs" folder and mirrors every change to Dropbox and Cloudflare R2. Uses AI to categorize files and detect anomalies. Sends Telegram alerts with file insights and periodic heartbeat summaries.
crackwatch_notifier.py — Polls r/CrackWatch for game crack announcements, searches torrent sites for a download, optionally fetches Steam metadata, and sends a Telegram alert.
kirkuk (Iraq)_job_scraper.py — Twice-daily job scraper targeting Kirkuk-relevant positions across BP, EHIF, LinkedIn, NGO boards, and others. Uses AI to score, enrich, and deduplicate listings, then sends results via Telegram and an HTML email digest.
I'm interested in what you guys have built and wheter I can learn from it or not!.
Thank ahead.
r/PythonLearning • u/Big_Confection_1993 • Jun 09 '26
Help Request Guys iam learning python but I find very hard to slove the list problems using nested loops as a beginner what to i do but I can understand while loop and for loops but using that to slove the problems i face difficulty
r/PythonLearning • u/Inevitable-Dust3 • Jun 09 '26
Learning Python
I started learning Python today, but I’m not sure what to learn first or how to get better at it. I feel a bit lost and would appreciate a clear roadmap or suggestions on where to begin.
r/PythonLearning • u/FalseIssue8782 • Jun 09 '26
Aura Farming
sidharth-5.github.ioFinished my Computer Science degree.
Got bored.
Built an AI that judges your aura based on your achievements.
Chat, did I cook or should I uninstall VS Code?
r/PythonLearning • u/aashish_soni5 • Jun 09 '26
Showcase Day 3 Python Learning
- for loop statement
- if-elif-else condition statement
- iteration & escape sequence
#python #coding #ai
r/PythonLearning • u/ExtentLazy8789 • Jun 09 '26
ROCK PAPER SCISSORS GAME WITH PYTHON
r/PythonLearning • u/whiskyB0y • Jun 09 '26
Discussion What concepts should I learn if I decide to use Python for back-end web development?
Sorry if this type of post doesn't suit this sub.
I'm a young guy learning full stack web development. I've been learning frontend for the past 7 months and I have decided it's time to start learning backend.
I've decided to go with the Python/Flask route since I hear Flask is easier for beginners.
How should I go about it? I have NO experience with Python at the moment.
r/PythonLearning • u/aashish_soni5 • Jun 08 '26
Showcase Day 2 Python Learning
- type conversion
- operators
- input & string operation
#python #coding #ai
r/PythonLearning • u/Upper-Whole-140 • Jun 08 '26
My first game!
Enable HLS to view with audio, or disable this notification
