☕ 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
Built a Flask API for managing cafés with CRUD operations and JSON responses
More Relevant Posts
-
✅ Day 66 of #100DaysOfCode — Building My Own REST API with Flask! Today, I learned how to design and implement a complete RESTful API from scratch using Flask and SQLAlchemy. I explored all the key HTTP methods — GET, POST, PATCH, and DELETE — while connecting the API to a real SQLite database. Here’s what I built : A “Cafe API” where you can: Fetch all or random cafes Search by location Add a new cafe Update coffee prices dynamically Delete closed cafes (with API key authentication) Key Takeaways: REST principles & CRUD operations API documentation & Postman testing Handling JSON requests and responses Using SQLAlchemy ORM for clean data management Building this REST API really helped me understand how backend servers communicate with clients and manage data securely. #Python #Flask #RESTAPI #WebDevelopment #100DaysOfCode #APIDevelopment #SQLAlchemy #LearningJourney
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
-
May I present? A simple Apache Airflow Forkbomb 💣! Okay, okay, I know this isn't a forkbomb technically, and you can achieve the same with @continuous and a regular Dag, but it's a great way to illustrate how Airflow assets work and how to get your instance sweating a bit 😉. Take a look at the code, this actually works and creates a cyclic scheduling dependency, running infinitely by triggering itself. Here's the magic behind it, which is crucial for understanding Airflow's asset-aware paradigm: 💡 @asset is a declarative shorthand that creates a Dag, a single task, and an asset as an outlet, taking the function name as the asset name by default. So, @asset def lets_go(): produces an asset named lets_go. 💡 Asset(...) creates a reference to an asset by its name. So, schedule=Asset("lets_go") tells the Dag to run whenever the asset named lets_go is updated. When you combine them, the Dag ends up scheduling itself. It's a perfect demonstration that in Airflow, asset identity is based on its name, not the Python object instance. This also highlights a fundamental concept: Airflow prevents cycles at the authoring level, but it allows them at the scheduling level. It's a fun way to annoy your data engineering peers on a Monday morning and a fantastic lesson on how assets really work. Have fun, but seriously, consider adding a sleep(...) to the function if you try this 🤣! #ApacheAirflow #DataEngineering #Orchestration #Python #DataPipelines #TechHumor #Forkbomb
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
-
What is the N+1 Problem in Backend Development (and How to Avoid It) Ever wondered why your backend slows down when fetching data with relationships — like posts and their authors? You might be facing the N+1 problem. Here’s what happens 👇 Your code makes 1 query to fetch all posts... Then, for each post, it makes 1 more query to fetch its author. That’s 1 (initial query) + N (extra queries per item) = N+1 queries total — a huge performance killer as your data grows. 💡 How to fix it: Use eager loading — fetch related data in one go with joins or prefetching. For example: In Django: select_related() or prefetch_related() In SQLAlchemy: joinedload() The result? ✅ Fewer queries ✅ Faster performance ✅ Happier users Backend optimization often starts with understanding small issues like this — they make a big difference at scale. #BackendDevelopment #DatabaseOptimization #WebPerformance #Python #Django #SQLAlchemy
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
-
-
Just came across Bruin Data (I couldnt figure out how to @ mention them) , sorry Burak Karakan Looks like a nice alternative to dbt core, but written in Golang. From their GH page, Bruin is packed with features: 📥 ingest data with ingestr / Python ✨ run SQL & Python transformations on many platforms 📐 table/view materializations, incremental tables 🐍 run Python in isolated environments using uv 💅 built-in data quality checks 🚀 Jinja templating to avoid repetition ✅ validate pipelines end-to-end via dry-run 👷 run on your local machine, an EC2 instance, or GitHub Actions 🔒 secrets injection via environment variables VS Code extension for a better developer experience ⚡ written in Golang 📦 easy to install and use Now how simple would it be to take a dbt project and have it "just work".....
To view or add a comment, sign in
-
📚 Built my own mini digital library from scratch — powered by Flask + SQLAlchemy! Ever wanted to track what books you’ve read (and rate them)? Now you can. This app lets you add, edit, and delete books with live updates — all stored in a clean SQLite database, styled with Bootstrap. 💡 Highlights: Full CRUD (Create, Read, Update, Delete) Declarative Base + SQLAlchemy ORM Lightweight, elegant Flask setup 💻 Tech Stack: Flask | SQLAlchemy | Bootstrap | SQLite 📂 GitHub: https://lnkd.in/g4eqsVKt 📁 Folder: LibraryManager No raw SQL. Just Python classes managing your database. It’s simple — and surprisingly powerful. #Python #Flask #SQLAlchemy #WebDevelopment #FullStack #Database #DeveloperPortfolio #BackendDevelopment #CRUD #CodingJourney #GitHub #100DaysOfCode
To view or add a comment, sign in
-
> 🔍 Day 61 — ELK Stack Basics (Centralized Logging) Today I built a full ELK Stack (Elasticsearch, Logstash, Kibana) from scratch to centralize and visualize logs across multiple servers. ⚡ Key Learnings: Setup and configure Elasticsearch, Logstash, and Kibana Parse logs using Grok filters Build custom dashboards to visualize errors and access patterns 🧪 Projects Completed: 1️⃣ Built a centralized Nginx log dashboard in Kibana 2️⃣ Automated log error detection with a Python script using the Elasticsearch API 💡 Insight: “Logs are not just for debugging — they’re the heartbeat of your infrastructure.” #DevOps #ELKStack #Elasticsearch #Kibana #Logstash #Logging #Monitoring #Python #Automation #Infrastructure #OpsWithMorteza #114DaysDevOpsRoadmap #LearningByDoing #SRE
To view or add a comment, sign in
-
-
Workflows in n8n and Zapier are powerful, until you need a Python library they don’t support. That’s where NodePy comes in. Extend your automations with full access to the most essential Python libraries: no deploys, no limits. From SQL and NoSQL databases to APIs, scraping, and image processing, NodePy lets your flows do what others can’t. ✔ SQL Databases: mysql, pymysql, psycopg2, pyodbc, sqlite3 ✔ NoSQL Databases: pymongo, cassandra, neo4j, elasticsearch, influxdb, couchdb ✔ Web & API: requests, smtplib, email ✔ Web Scraping: bs4, lxml ✔ Image Processing: PIL, imageio Build smarter, automate deeper, and unlock the full Python ecosystem inside n8n and Zapier with NodePy. 🔗 nodepy.com #NodePy #n8n #Zapier #PythonAutomation #DevTools #APIAutomation #WorkflowAutomation #NoCodeTools #LowCodeDevelopment
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