🔧 Learning System Design from Scratch — One Microservice at a Time As I dive deeper into system design fundamentals, I’ve found that the best way to learn is by building real, working components — and that’s exactly what I did with a recent mini-project: a URL Shortener API. Instead of just reading theory, I chose to implement a small backend service using FastAPI and SQLite to understand how lightweight services are architected, validated, and deployed. Here’s why I picked these tools: 🚀 FastAPI: A modern Python framework that made it super easy to build clean, async-ready REST endpoints (POST /shorten, GET /{short_id}) with built-in data validation and auto-generated Swagger docs. Perfect for quick iteration and clarity. 🧱 SQLite: A serverless, file-based database that let me persist short URLs with zero setup. Lightweight, fast, and perfect for small-scale systems like this one — especially when paired with SQLAlchemy for ORM support. This project helped me grasp core concepts like: ✔ Designing RESTful endpoints ✔ Input validation using Pydantic ✔ Connecting APIs to persistent storage ✔ Testing with Postman & understanding local-to-remote communication ✔ Thinking about the trade-offs of architecture choices (e.g., async vs sync, file-based DBs vs hosted ones) 💡 Takeaway: System design isn’t just about handling millions of users — it’s about making the right technical choices for the problem at hand. FastAPI + SQLite was the right stack here, and it taught me how to think practically about designing backend systems from the ground up. Github Repo: https://lnkd.in/gnYgesCV #SystemDesign #BackendDevelopment #FullStackDeveloper #FastAPI #SQLite #Microservices #Python #LearningInPublic #BuildInPublic #DeveloperJourney
Building a URL Shortener API with FastAPI and SQLite
More Relevant Posts
-
🚀 Hands-On with FastAPI: My First CRUD App Over the past few days, In the process to learn about Fast-API I developed a basic CRUD API to dive deep into backend development. This project was purely for learning, but it gave me hands-on experience with key technologies and concepts. Technologies I worked with: FastAPI – RESTful APIs with automatic documentation and type safety Pydantic – Data validation and serialization with request/response models SQLAlchemy – ORM integration for database operations and relationships Uvicorn – ASGI server for async application execution SQLite – Database setup, sessions, and dependency injection What I learned: ✅ Structuring a FastAPI project with models, schemas, CRUD operations, and database config ✅ Difference between Pydantic models (validation) and SQLAlchemy models (database) ✅ Database session management and lifecycle ✅ Power of FastAPI’s automatic Swagger UI for instant API testing ✅ Importance of type hints in Python for building robust APIs Even though this project is Basic, it helped me understand how different backend technologies work together. Sometimes, learning and sharing small wins is just as important as tackling complex projects. 📂 GitHub Repo: https://lnkd.in/gfT6DVrK #FastAPI #Python #BackendDevelopment #SQLAlchemy #Pydantic #RESTfulAPI #LearningToCode #SoftwareEngineering
To view or add a comment, sign in
-
Myth busting for 2025: for rapid prototypes, smaller still beats bigger. Flask remains my first pick because it keeps the surface area tiny and lets you ship fast without fighting the framework. Why it works: - Minimal core, batteries on demand. Start with a single route, then add what you need. Fewer dependencies means faster installs and fewer security patches amid ongoing supply chain noise on Python Package Index. - Modern enough for today. Flask 3.x supports type hints and async views, so integrating async HTTP clients or message queues is straightforward. It pairs well with the rise of server driven UI patterns using HTMX. - Cloud friendly. Containerize it and deploy to Google Cloud Run, Fly.io, or Render in minutes. - Plays nicely with data and automation. Perfect for a thin Application Programming Interface (API), a webhook relay, or an admin tool that glues services together. A proven starter stack: Flask, SQLite with SQLAlchemy, Pydantic for request models, Flask Migrate, Flask Cross Origin Resource Sharing (CORS), and RQ or Dramatiq for background jobs. Add pytest from day one. What is your experience with Flask for first versions? Would you still build it this way? #Flask #Python #RapidPrototyping
To view or add a comment, sign in
-
-
⚔️ FastAPI vs Flask — Which One Should You Choose? When it comes to building APIs in Python, two names dominate the scene — Flask and FastAPI. Both are powerful, flexible, and widely used — but they shine in different situations. Let’s break it down 👇 ⚡ FastAPI ✅ Modern & Fast – Built on ASGI with async/await, ideal for high-performance apps. ✅ Type Hints – Automatic data validation with Pydantic. ✅ Auto Documentation – Swagger & ReDoc out-of-the-box. ✅ Perfect For – RESTful APIs, microservices, ML model deployment, async workloads. 🧠 Best Choice If: You want speed, modern syntax, and built-in validation for scalable systems. 🔥 Flask ✅ Lightweight & Simple – Minimal setup, flexible for small apps. ✅ Huge Ecosystem – Tons of plugins and community support. ✅ Great for Beginners – Easy to learn and extend. ✅ Perfect For – Prototyping, small projects, traditional synchronous APIs. 🧠 Best Choice If: You prefer simplicity, control, and are building smaller or less concurrent apps. ⚙️ In Summary Flask Performance: Moderate Async Support: No Type Hints: No Auto Docs: Manual Ease of Learning: Easy Best Use: Small projects FastAPI Performance: Excellent Async Support: Yes Type Hints: Yes Auto Docs: Built-in Ease of Learning: Moderate Best Use: Scalable APIs 💡 Takeaway: Use Flask when you want flexibility and simplicity. Use FastAPI when you want performance, validation, and scalability. #FastAPI #Flask #Python #BackendDevelopment #API #WebDevelopment #Programming #SoftwareEngineering #LearningInPublic #TechEducation
To view or add a comment, sign in
-
-
📖 Built a Secure Book Management API Using FastAPI Recently, I worked on a backend project that demonstrates secure and scalable API development using FastAPI, JWT Authentication, and Async SQLAlchemy — focused on implementing CRUD operations with real-world production features. The project is designed to help understand how modern backend systems are structured, authenticated, and optimized for performance. 🧿 What was the goal? To build a secure, high-performance REST API that handles book records efficiently — with features like token-based authentication, rate limiting, and asynchronous database operations. A practical project to solidify my backend and API development fundamentals. 🧿 What I did: → Implemented JWT Authentication for secure login and route protection → Created CRUD endpoints for managing book data → Used Async SQLAlchemy and SQLite for efficient database operations → Integrated rate limiting using slowapi to control request flow → Followed a clean, modular structure for scalability and readability 🧿 Tech Stack: - FastAPI - SQLAlchemy (Async) - SQLite - SlowAPI - Python 3.10+ 🧿 Key Features: → Token-based authentication for protected routes 🔐 → Asynchronous CRUD operations ⚡ → Rate limiting to prevent request spamming ⏱️ → Fully validated request/response models via Pydantic → Auto-generated interactive API docs (Swagger UI & ReDoc) 📂 GitHub: https://lnkd.in/dtJYqUj6 💡 What I Learned: ✅ How to design and secure REST APIs with JWT ✅ How to use async operations for better performance ✅ How to implement rate limiting in production-level APIs ✅ How to structure and modularize backend projects ⚙️ This project helped me strengthen my backend foundations and understand how security, scalability, and speed can coexist in a single API architecture. #FastAPI #Python #BackendDevelopment #APIDevelopment #WebDevelopment #JWT #Authentication #CRUD #AsyncProgramming #SQLAlchemy #Database #SlowAPI #RateLimiting #OpenSource #RESTAPI #SoftwareEngineering #Developer #Coding #Programming #Project #Tech
To view or add a comment, sign in
-
Just wrapped up an Data Analysis project on Online Retail Customer Analytics using Python! So much learned and some really cool insights gained. 𝐖𝐡𝐚𝐭 𝐈 𝐝𝐢𝐝: 1.𝐃𝐚𝐭𝐚 𝐂𝐥𝐞𝐚𝐧𝐢𝐧𝐠 & 𝐏𝐫𝐞𝐩𝐫𝐨𝐜𝐞𝐬𝐬𝐢𝐧𝐠: Tackled missing descriptions and inconsistent data, ensuring a robust datasetfor analysis. Used techniques like imputing missing values and filtering out irrelevant entries. 2.𝐅𝐞𝐚𝐭𝐮𝐫𝐞 𝐄𝐧𝐠𝐢𝐧𝐞𝐞𝐫𝐢𝐧𝐠: Created new features like `Total_Price` and extracted `Month` from `InvoiceDate` to enrich the dataset. 3.𝐄𝐱𝐩𝐥𝐨𝐫𝐚𝐭𝐨𝐫𝐲 𝐃𝐚𝐭𝐚 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬 (𝐄𝐃𝐀): Dived deep into the data to understand sales trends, customer behavior, and product performance. 4.𝐑𝐅𝐌 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬 (𝐑𝐞𝐜𝐞𝐧𝐜𝐲, 𝐅𝐫𝐞𝐪𝐮𝐞𝐧𝐜𝐲, 𝐌𝐨𝐧𝐞𝐭𝐚𝐫𝐲): Segmented customers based on their purchasing habits to identify high-value, loyal, and at-risk customers. 5.𝐂𝐮𝐬𝐭𝐨𝐦𝐞𝐫 𝐂𝐡𝐮𝐫𝐧 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬: Visualized customer recency and identified a churn threshold to understand customer retention. 𝐓𝐨𝐨𝐥𝐬 𝐔𝐬𝐞𝐝: Python: The core language for data manipulation and analysis. Pandas: For efficient data handling and transformation. Matplotlib & Seaborn: For creating compelling data visualizations. 𝐊𝐞𝐲 𝐈𝐧𝐬𝐢𝐠𝐡𝐭𝐬 & 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠𝐬: 𝐒𝐞𝐚𝐬𝐨𝐧𝐚𝐥 𝐒𝐚𝐥𝐞𝐬 𝐏𝐞𝐚𝐤𝐬: Discovered significant sales increases towards the end of the year, likely driven by holiday shopping. 𝐆𝐞𝐨𝐠𝐫𝐚𝐩𝐡𝐢𝐜 𝐒𝐚𝐥𝐞𝐬 𝐂𝐨𝐧𝐜𝐞𝐧𝐭𝐫𝐚𝐭𝐢𝐨𝐧: The UK dominates sales, highlighting potential focus areas for international expansion or targeted marketing. 𝐓𝐨𝐩 𝐏𝐫𝐨𝐝𝐮𝐜𝐭𝐬 𝐃𝐫𝐢𝐯𝐞 𝐑𝐞𝐯𝐞𝐧𝐮𝐞: A few key products contribute a substantial percentage to overall sales, indicating opportunities for inventory management and promotional strategies. 𝐂𝐮𝐬𝐭𝐨𝐦𝐞𝐫 𝐒𝐞𝐠𝐦𝐞𝐧𝐭𝐚𝐭𝐢𝐨𝐧 𝐢𝐬 𝐊𝐞𝐲: RFM analysis provides a powerful framework for understanding customer value and tailoring engagement strategies. 𝐄𝐚𝐫𝐥𝐲 𝐂𝐡𝐮𝐫𝐧 𝐃𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧: Monitoring customer recency is crucial for proactive interventions to prevent churn. This project really deepened my understanding of retail analytics and the power of data driven decision making. Always learning, always growing! Project link: https://lnkd.in/gC2kh3vr #DataAnalytics #CustomerAnalytics #Retail #Python #Pandas #DataScience #RFMAnalysis #ChurnAnalysis #DataVisualization #Project
To view or add a comment, sign in
-
I used LLMs to solve a problem every dev team faces: mock API hell. The problem: Frontend needs APIs. Backend isn't ready. Manual mocking = hours of tedious, error-prone work. The solution: MockGen An AI-powered tool that converts plain English → live REST/GraphQL mock servers in under 60 seconds. How it works: → Describe your API in natural language → LLM generates validated OpenAPI/GraphQL schemas → FastAPI spins up stateful endpoints instantly → Full introspection + runtime validation included Tech stack: Python - FastAPI - LangChain - OpenAI/Gemini - Vue.js - Docker Real impact: ✅ Setup time: Hours → <1 minute ✅ Frontend unblocked from sprint day 1 ✅ 80% fewer API contract mismatches ✅ Better integration testing early 100% open-source and production-ready. 👉 github.com/Mo-Ko/MockGen How does your team handle API mocking? #Python #FastAPI #LangChain #GenerativeAI #DeveloperTools #APIDesign #OpenSource #DevOps
To view or add a comment, sign in
-
⚡ FastAPI Performance Tip: Async/Await Done Right Building RESTful APIs with FastAPI for 3+ years taught me this crucial lesson: ❌ Common mistake: Using async/await without actual async operations Many developers write async functions but still use blocking operations inside. Result? No performance gain, just overhead. ✅ Here's the right approach: # ❌ Wrong - Still blocking! async def get_user(user_id: int): user = db.query(User).filter(User.id == user_id).first() return user # ✅ Correct - Truly async! async def get_user(user_id: int): async with get_async_session() as session: result = await session.execute( select(User).where(User.id == user_id) ) return result.scalar_one_or_none() 💡 Key takeaways: • Use async database drivers (asyncpg, aiomysql) • Await ALL I/O operations (DB, HTTP, file reads) • Regular sync code in async functions = bottleneck • Use httpx instead of requests for HTTP calls 🚀 Result: 3-5x better throughput under high load! 🎯 Pro tip: Use FastAPI's dependency injection with async session management for clean, efficient code. Building APIs? What's your biggest FastAPI challenge? Drop it below! 👇 #FastAPI #Python #BackendDevelopment #APIs #WebDevelopment #SoftwareEngineering #AsyncProgramming #Performance
To view or add a comment, sign in
-
🚀 For the first time, TypeScript has officially become the #1 most-used language on GitHub according to the latest Octoverse report by GitHub This is a significant milestone in the evolution of the developer stack, indicating a clear preference for type safety and scalability in modern applications. When you look closer at the data: - TS + JS: Together, JavaScript and TypeScript have the highest combined usage, continuing their domination of the web. - The AI Engine: Python's position remains incredibly strong, almost entirely fueled by its role as the undisputed language for AI, data science, and automation. Jupyter Notebooks, commonly used for AI and ML, also showed a significant increase. The landscape is clearly shifting, with AI playing a major role. Here’s the full top 10: TypeScript 🟦 Python 🐍 JavaScript 🟨 Java ☕️ C# 🟩 C++ 🔵 Go 🧢 PHP 🐘 Shell 💻 Ruby 💎 What's your analysis of this shift? Link to the full report (with numerous interesting data points) in the comments. #Octoverse #AI #DeveloperTrends #TypeScript #Python
To view or add a comment, sign in
-
-
Today I spent some time improving the code quality and maintainability of our data pipelines using Pylint — a simple but powerful tool that often gets overlooked in Data Engineering projects. 🔍 What is Pylint? Pylint is a Python static code analysis tool that checks for: 1. Code errors and bad practices 2. Style consistency (PEP8) 3. Unused imports or variables 4. Docstring and naming issues 5. Complexity and maintainability scores It’s like having a code reviewer that never gets tired — catching small issues before they become big problems. 🧩 Example 1: Bad vs Good Code ❌ Bad Code: def getdata(x,y): return x+y ✅ Good Code (Pylint-friendly): def get_data(x: int, y: int) -> int: """Return the sum of two numbers.""" return x + y ✅ Pylint flags missing docstrings, poor naming (getdata → get_data), and missing type hints — nudging you toward clean, readable code. 🧩 Example 2: Unused Imports ❌ Bad Code: import pandas as pd import numpy as np def square(x): return x * x ✅ Good Code: def square(x: int) -> int: """Return square of a number.""" return x * x ✅ Pylint detects that pandas and numpy aren’t used and suggests removing them — helping keep the code lightweight and efficient. 💡 Why This Matters for Data Engineers? We often discuss Spark, Snowflake, Hadoop, Kafka, and other big data technologies — but we rarely talk about code observability and quality. Yet, as our pipelines grow in complexity, maintainable, readable, and testable code becomes just as important as scalability and performance. Tools like Pylint, along with unit testing, type hints, and linting pipelines in CI/CD, make a huge difference in the long run. You can check the documentation here: https://lnkd.in/gUeMKzae 👨💻 Let’s remember — writing good data engineering code isn’t just about moving data fast, it’s about making it future-proof. #DataEngineering #Python #Pylint #CleanCode #SoftwareEngineering #Spark #Snowflake #CodeQuality #BestPractices #GenAi
To view or add a comment, sign in
-
☕ Built a Flask REST API that manages cafés across cities — complete with CRUD operations, SQLAlchemy ORM, and JSON responses. You can fetch random cafés, search by location, update prices, or add new ones — all from clean, RESTful endpoints. 💡 Highlights: Full CRUD API (GET, POST, PATCH, DELETE) SQLAlchemy ORM + SQLite JSON data responses Secure delete with API key 💻 Stack: Flask | SQLAlchemy | SQLite | REST API 📂 GitHub: https://lnkd.in/g4eqsVKt 📁 Folder: CafeAPI Simple. Scalable. Developer-friendly. #Python #Flask #API #WebDevelopment #RESTAPI #SQLAlchemy #BackendDevelopment #FullStack #100DaysOfCode
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