Today I ran into a classic backend bug while testing my FastAPI project 🚀 Everything was working fine until login started throwing a 500 error. After debugging, I found the issue: Environment variables are always read as strings — which caused a failure in timedelta() while generating JWT tokens. A small fix (casting to int) solved it, but the learning was huge: ✔ Always validate environment configs ✔ Debugging > coding ✔ Real-world issues teach the most Also successfully: ✅ Deployed FastAPI app on Render ✅ Integrated PostgreSQL ✅ Implemented authentication with JWT ✅ Added pagination Next step: Docker + CI/CD 🔥 Live API: https://lnkd.in/gVAWNtVp #FastAPI #BackendDevelopment #Python #DevOps #LearningInPublic
FastAPI Environment Variable Bug Fix and Deployment
More Relevant Posts
-
Building a RESTful API with FastAPI and Pydantic I am excited to share my latest backend development project: a clean and standardized Library Management System built with the FastAPI framework. Key Technical Features of this project: Data Validation: Leveraged Pydantic for rigorous input validation and ensuring schema integrity. CRUD Operations: Implemented a full suite of Create, Read, Update, and Delete functionalities. Error Handling: Managed HTTP errors using HTTPException to enhance API reliability and user experience. Query & Path Parameters: Optimized data retrieval using path and query parameters for precise filtering. Automatic Documentation: Utilized FastAPI’s built-in Swagger UI for seamless endpoint testing and documentation. This project was a great opportunity to dive deeper into building scalable and type-safe APIs with Python. You can check out the full source code and documentation on my GitHub: 📌 GitHub Repository: [https://lnkd.in/dWQxm9xV] #Python #FastAPI #BackendDevelopment #WebDevelopment #Pydantic #API #Programming #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Ever wondered what’s really inside `app.routes` in FastAPI? Most developers use FastAPI daily… but very few actually understand how routing works under the hood 👀 👉 `app.routes` is not just a list — it’s the “core routing table” that decides: * which endpoint gets executed * how requests are matched * and why “order matters more than you think” 💡 Each route carries powerful metadata: `path`, `methods`, `endpoint`, `name`, `response_model` & more — everything FastAPI needs to process a request efficiently. ⚠️ Fun fact: The router follows a “top-to-bottom matching strategy” -> first match wins. 🔥 If you’re building APIs, understanding this gives you: * better debugging skills * cleaner architecture * fewer “why is this endpoint not working?” moments 💬 Have you ever debugged using `app.routes`? Drop your experience below 👇 #FastAPI #Python #BackendDevelopment #APIs #WebDevelopment #SoftwareEngineering
To view or add a comment, sign in
-
-
Day 4 of learning backend from first principles. Today I went deeper into how the web actually communicates. Focused on: • HTTP — request/response cycle • How servers handle multiple requests • Built basic real-time communication using WebSockets in Python Big realization: HTTP is stateless — every request is independent. But real-world apps (chat, live updates, notifications) need continuous communication. That’s where WebSockets come in. Instead of: Request → Response → Close It becomes: Connection → Continuous data flow This is the difference between: Loading a page vs building real-time systems. Still connecting the dots, but now I’m starting to see: Backend isn’t just APIs — it’s communication architecture. #BackendDevelopment #Django #WebSockets #HTTP #WebDevelopment #LearnInPublic #Python #SoftwareEngineering
To view or add a comment, sign in
-
Stop writing messy FastAPI code. Start using Modules I’ve always loved FastAPI for its speed, but as projects grow, the structure often becomes a nightmare. Coming from a NestJS background, I missed the modularity and the clean Dependency Injection. So, I decided to build it myself. Introducing FastNest (v0.1.1) — a progressive Python framework that brings enterprise-grade structure to the FastAPI ecosystem. Why should you care? 🔹 Modular Architecture: No more giant main.py files. Break your app into clean, reusable modules. 🔹 Built-in DI: Let the framework handle your service lifecycles. 🔹 WebSocket Gateways: Real-time communication is now as simple as a decorator. 🔹 Pydantic v2 Ready: Performance-first validation out of the box. I built this for developers who want the speed of Python with the organization of a professional backend architecture. #Python #FastAPI #WebDevelopment #SoftwareArchitecture #OpenSource #FastNest #BackendDevelopment #MoroccoTech #DevMorocco
To view or add a comment, sign in
-
-
Recently, I worked on a background removing tool — and it turned out to be way more than just integrating an API. The popular options like remove.bg charge per image once you pass the free tier. Not sustainable at scale. So I found rembg on GitHub — open-source, runs the U2-Net model locally, completely free. Wrapping it into a FastAPI service was the first challenge. Then came hosting. Tried Render.com's free tier — the model downloaded fine, then the server crashed. 512MB RAM isn't enough for an AI model. Moved to a VPS, got FastAPI running behind Nginx, and connected it to Laravel with a single HTTP call. That was it. Longer than expected. But the result is unlimited, self-hosted background removal with zero ongoing cost. Full Article: https://lnkd.in/gckebJG6 Try Tool: https://lnkd.in/grmnuNH8 #WebDevelopment #Python #Laravel #SelfHosted #BuildInPublic
To view or add a comment, sign in
-
-
“App started breaking under the first production load test, even though the structure was correct.” Sometimes it’s not just about having a perfect application structure but about proper configuration tuning. That’s why I’m sharing another comparison, the earlier run without tuning (present on my profile) and the optimized version after tuning. At ~300 concurrent users, latency behavior degraded sharply, P99 reached ~2.7s and max spikes went up to ~7s, even though average response time still looked normal. The issue wasn’t the API structure or queries; it was how DB connections were being handled under concurrency. Pooling wasn’t properly enforced, so requests started queuing instead of executing in parallel. After fixing proper pool acquisition and ensuring each request correctly borrows/releases a connection, performance stabilized under the same load. Same system. Different behavior under pressure. #fastapi #python #backenddevelopment #postgresql
To view or add a comment, sign in
-
-
Most devs missed what Claude Code actually revealed. It ships as a Bun executable. Not Node. Not Python. That one detail points to something bigger: a shift in the runtime layer. So I asked myself — do I actually understand Bun beyond the hype? I built BunEx to find out. It's a clean, hands-on way to explore all four things Bun replaces at once: → Runtime → Package manager → Bundler → Test runner Here's what changes the game: most JS stacks are stitched together from separate tools. Bun collapses that into one — and it's significantly faster. But let's be honest about the tradeoffs: — Not 100% Node-compatible yet — Real adoption needs to be gradual The lowest-friction entry point? Swap npm install for bun install in your next project. That's it. This isn't a rewrite-everything argument. It's pattern recognition: tooling consolidation is the direction the ecosystem is heading, and Bun is the clearest signal we have right now. Full guide in the first comment 👇
To view or add a comment, sign in
-
-
I used to think backend development was complicated. Too many concepts. Too much setup. It felt difficult to move from theory to actually building something real. Then I started learning FastAPI. This time, I didn’t just watch tutorials. I focused on building. - My Journey with FastAPI As a Python developer, FastAPI felt simple, fast, and practical from the start. It helped me understand how backend systems actually work instead of just learning concepts. - Why FastAPI? - High performance - Clean and easy syntax for Python developers - Built-in validation using Pydantic - Automatic API documentation with Swagger UI - What I’ve learned - Building REST APIs using GET and POST methods - Handling request and response data - Using Pydantic for data validation - Testing APIs using interactive Swagger documentation - What I’ve built I built backend projects using FastAPI where I created API endpoints, validated data, and tested everything through auto-generated docs. This hands-on experience helped me connect theory with real-world development. Working with FastAPI has improved my confidence in backend development and made me more comfortable building practical applications. If you are learning development and feel stuck, try building something instead of only consuming content. I would love to know what you are currently working on. #FastAPI #Python #BackendDevelopment #WebDevelopment #LearningInPublic
To view or add a comment, sign in
-
-
OpenClaw hit 300K GitHub stars this year. It also got caught leaking user data through a malicious skill, and Bitdefender found 135,000 instances exposed on the open internet. I loved the architecture. I didn't love the security posture, and I didn't love that the whole thing was TypeScript — Python is where the ML/AI ecosystem actually lives. So I'm building a Python port, with a different scope philosophy. OpenClaw-py — same modular workspace pattern, now in Python + React. But task-scoped rather than tool-sprawled. Every feature is a module with a narrow job. The first one, MailMind, handles Gmail triage locally via Ollama — summaries and reply drafts, nothing leaves your machine. The architecture is the part I care about: → Single llm_generate() entry point, providers swappable (Ollama / Claude / OpenAI / Gemini) → Module manifest pattern — adding a new module is ~7 files, core untouched → Fernet-encrypted keys on disk, Ollama default, no telemetry Full credit to Jonas Steinberger and the OpenClaw team for the original architecture. This is a port with a different philosophy, not a replacement. Original OpenClaw → https://lnkd.in/e2iUBeEN My port → https://lnkd.in/e_8k-UxJ Early, rough in places, but the module contract works. If you've been wanting to build on OpenClaw-style patterns in Python, I'd genuinely like your eyes on it. #LocalAI #Ollama #Python #OpenSource #BuildInPublic #openclaw
To view or add a comment, sign in
-
Ever wondered what those file extensions actually mean? From .py to .exe, each file type has its own purpose, and knowing them can level up your tech skills instantly. 1. .py – Python file 2. .apk – Android app file 3. .exe – Executable program 4. .zip – Compressed folder 5. .csv – Data file …and many more! Save this post for quick reference & share it with your tech-savvy friends! #techtips #fileextensions #codingbasics #digitalskills #computerknowledge
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