FastAPI Depends() — the pattern I learned 7 weeks too late Tutorials show you Depends() in week 1. Nobody shows you composition until your auth is already a mess. The 4-day refactor I could have skipped. Full breakdown (7 min read) → https://lnkd.in/g9F9EWKT #Python #Backend #FastAPI #SoftwareEngineering #WebDev
FastAPI Depends() Composition Refactor
More Relevant Posts
-
Day 38/100 – #100DaysOfCode 🚀 Solved LeetCode #2011 – Final Value of Variable After Performing Operations (Python). Today I practiced string handling and simple iteration to compute the final value after a series of operations. Approach: 1) Initialize a variable x = 0. 2) Traverse through each operation in the list. 3) If the operation contains "++", increment x by 1. 4) Otherwise, decrement x by 1. 5) Return the final value of x. Time Complexity: O(n) Space Complexity: O(1) Simple logic but great practice for handling strings and loops 💪 #LeetCode #Python #DSA #Strings #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
Generate a #Python #Pandas DatetimeIndex of datetime values, specifying the frequency, by passing freq and a code: pd.date_range(start='2026-03-01', end='2026-05-01', freq='8h') This returns a 184-element DatetimeIndex with evenly-spaced datetime values in that period.
To view or add a comment, sign in
-
-
Built a thing where you wave your hands at your screen to explore a knowledge graph. Is it fun? Yes. Does it look ridiculous? Absolutely. Did I shared it anyway? You're reading this post so yes. It's called OpenAtlas. Comes with sample graph data or bring your own. Two commands to run it. Github: https://lnkd.in/gQnzR69s #Python #OpenSource #ComputerVision #KnowledgeGraph #Visualization
To view or add a comment, sign in
-
💡 Tiny Python tip that improves code clarity With a normal tuple, you have to remember what each index stands for. That knowledge lives in your head, not in the code. `namedtuple` fixes this by giving semantic meaning to each position. You still get immutability and performance, but with clear, self-documenting access. #Python #PythonProgramming #CleanCode #CodingBestPractices #CodeReadability
To view or add a comment, sign in
-
-
🚀 Day 11 of My Python + DSA Journey Today’s problem was all about greedy approach👇 ✅ Jump Game (#55) 💡 Jump Game Check if you can reach the last index 🔍 Approach: Tracked maximum reachable index → if current index exceeds it, return False ⏱ O(n) time | O(1) space 🔥 What I learned today: • Greedy approach can simplify complex problems • Tracking max reach avoids unnecessary checks • Early exit conditions improve efficiency Turning logic into faster decisions ⚡ #Day11 #LeetCode #Python #DSA #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
How to use Python (Pandas and Matplotlib) to convert GenAI-generated Multiple Choice Questions (MCQs) into clean, professional images—Watch Video here : https://lnkd.in/gCCXd5HZ
To view or add a comment, sign in
-
Compute options Theta with QuantLib: Here's a step-by-step guide with Python code to get you started in 10 minutes: https://lnkd.in/e-87CH7C And here's a thread I did that gives another breakdown:
To view or add a comment, sign in
-
-
Someone asked me this morning: "How did you learn to build APIs?" Truth? I didn't learn from a course. I learned by breaking things and fixing them. I wrote down everything I wish someone had told me — in a step‑by‑step tutorial. What's inside: - Single + batch endpoints (not just one) - Caching (so your API doesn't die) - Deployment on Render (free tier) - A free tier example you can copy Built the same way my live API works. Link in first comment 👇 #FastAPI #Python #BuildInPublic
To view or add a comment, sign in
-
Tiny Python upgrade for cleaner analytics code: Use Counter instead of manual dict increments. You get frequency maps in one pass and top-N insights with most_common(). Less boilerplate, fewer mistakes, faster review. Mini pattern: - counts = Counter(values) - top = counts.most_common(3) - act on thresholds #Python #CodingTips #Backend #DevTips #SoftwareEngineering
To view or add a comment, sign in
-
-
Type check your Python codebase 15x faster with Pyrefly ⚡ Tools like MyPy and Pyright process files sequentially, so larger codebases lead to longer wait times. Pyrefly, Meta's Rust-based type checker, runs checks in parallel, keeping performance nearly constant as your codebase grows. Key features: • Re-checks only changed modules for faster incremental runs • Automatically infers types for variables and return values On the PyTorch codebase, Pyrefly completes a full check in 2.4 seconds, about 15x faster than Pyright and 20x faster than MyPy. --- 📬 I share 2 practical tips on practical tools for data and AI twice a week on Substack. Subscribe here: https://bit.ly/46fdOPl #Python #TypeChecking #Rust
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development