🚀 Built my first CRUD API using FastAPI + MySQL and deployed it on Render! 🌐 Live URL: https://lnkd.in/gHKJaCXx Today I created a REST API with full CRUD operations using Python (FastAPI) and MySQL as the database, and deployed it using Render. What I built: ✔ GET → Read data from MySQL ✔ POST → Insert data into MySQL ✔ PUT → Update existing records ✔ DELETE → Remove records from MySQL Deployment: 🌐 Hosted on Render This project helped me understand how backend systems work in real-world applications—from API design to database integration and deployment. Key learnings: - REST API design principles - CRUD operations with MySQL - FastAPI backend development - Deploying applications on Render It’s a simple project, but it reflects real-world backend architecture. Next step: add authentication and improve security. #Python #FastAPI #MySQL #CRUD #BackendDevelopment #Render #Deployment #RESTAPI
Built CRUD API with FastAPI + MySQL on Render
More Relevant Posts
-
Today I completed a major upgrade to my Inventory Management API — moving from an in-memory CRUD system to a fully database-backed backend using Flask and MySQL. What started as a simple API using Python dictionaries evolved into a structured backend system with: Layered architecture (routes, service, storage) MySQL integration using mysql-connector-python Dynamic update handling Input validation and field control Proper HTTP status codes Unique constraint handling with conflict responses The most important learning was not writing SQL or Flask routes — it was understanding how to design systems: Why database operations don’t behave like in-memory structures How to safely execute queries using parameterized statements Why constraints (like unique fields) must be handled at both database and application level How small design decisions (like structure) make future changes easier One key takeaway: Refactoring early made a huge difference. Because I separated routes, service, and storage layers, replacing the in-memory storage with MySQL was smooth instead of painful. What I initially thought would take multiple days, I was able to complete in a single focused session — not because it was easy, but because the foundation was strong. Next steps: Add authentication (user/admin roles) Deploy the API Build more backend-focused systems This project marks a shift for me — from learning syntax to building real backend systems. https://lnkd.in/gkPHWzPB #BackendDevelopment #Python #Flask #MySQL #APIs #LearningByBuilding
To view or add a comment, sign in
-
PyAdminer Tired of fighting phpMyAdmin—or lugging a heavy desktop client—just to work with MySQL? I’ve been building PyAdminer: a lightweight Python + Flask web UI for MySQL and MariaDB. Think Adminer-style browsing and editing, with extras for day-to-day database work. Here’s what stands out: → Built-in optional AI: natural language → suggested SQL (configurable, can be turned off). → Full database and table workflows—structure with indexes and foreign keys, filters, and safe edit/delete using real primary keys (including composite keys). → A SQL command panel, plus an optional AI assistant that suggests SELECT queries from plain English. You choose the provider in settings; admins can turn it off entirely. → Visualize tab: column profiles, charts (categorical, time series, scatter), and pivots. → Impact, Quality, and Diff views—foreign-key relationships, duplicate keys, orphan checks, and table comparison. → A rich data grid: numeric heatmaps, plus expanders for JSON and long text. → ER diagrams (Mermaid), plus an Advanced panel for views, routines, triggers, and events. → Exports to CSV and SQL, optional read-only mode, HTTP Basic Auth, rate limits, an audit log, and a /health endpoint for monitoring. MIT licensed. Easy to self-host—including Docker for a quick local stack. If you live in dashboards and terminals, this might cut a few context switches. Repository: https://lnkd.in/g5Nd8Fsy Stars, issues, and pull requests welcome—I’d love more eyes on MySQL/MariaDB tooling in open source. #OpenSource #Python #Flask #MySQL #MariaDB #DatabaseTools #DevOps
To view or add a comment, sign in
-
🚨 We Thought Our System Was Slow… Until We Found This One Missing Index Early in my career, I believed: 👉 “If the system is slow, maybe the technology is the problem.” I was wrong. --- ⚠️ Real Production Issue In one of our CMS projects using MySQL: - API response time suddenly increased - Simple queries started taking seconds - CPU usage was high Everything looked fine… except performance. --- 🔍 What I Found There was a query like this running frequently: - Filtering on a column - Joining tables - But… no index on that column 👉 Which means: Every time the query ran, MySQL was scanning the entire table 😳 --- 💥 The Impact - Full table scans on lakhs of records - High memory usage - Slow response times - Poor user experience All because of one missing index --- 🛠️ The Fix ✔️ Added index on the filtering column ✔️ Added index on JOIN columns That’s it. --- 🚀 Result - Query time: seconds → milliseconds ⚡ - CPU usage dropped - System performance improved instantly --- 💡 Big Lesson Databases are powerful… but without indexes, they become slow very quickly. 👉 Especially in CMS systems where data grows continuously. --- ⚡ Pro Tip Before blaming backend or server: Ask yourself: - Is this column indexed? - Is this query scanning the full table? --- 😅 Be Honest Have you ever forgotten to add an index and faced performance issues? 👉 Yes / No --- Next post: “How too many indexes can also hurt performance” 🔄 --- #MySQL #PHP #Python #SQL #BackendDevelopment #PerformanceOptimization #Debugging #WebDevelopment #Developers #Database #Cod
To view or add a comment, sign in
-
⚡ Connection Pooling in FastAPI with PostgreSQL (Why it matters) When I started building APIs with FastAPI + PostgreSQL, I made a common mistake 👇 👉 Opening a new database connection for every request It worked… until traffic increased 😅 ❌ Problem: Too many open connections Slower response times Database overload 💡 Solution: Connection Pooling Instead of creating new connections every time, we reuse a pool of existing connections. ✅ Benefits: ✔ Faster API responses ✔ Better resource management ✔ Handles high traffic efficiently 🔧 Example (SQLAlchemy): from sqlalchemy import create_engine engine = create_engine( "postgresql://user:password@localhost/db", pool_size=10, max_overflow=20, pool_timeout=30 ) 💡 What I learned: If you're building production APIs with FastAPI, connection pooling is not optional — it's essential. 🚀 Next step: Combining this with async DB handling for even better performance #FastAPI #PostgreSQL #Backend #Python #APIs #WebDevelopment
To view or add a comment, sign in
-
-
I released Scythe — an open-source SQL compiler and linter built in Rust. Write SQL. Generate type-safe, idiomatic database access code. No ORM needed. The problem: ORMs add bloat, hide performance issues, and create hard-to-debug edge cases. SQL is already a mature, type-safe language — it should be the source of truth. What Scythe does: It parses your SQL schema and queries, infers types and nullability statically, and generates production-ready code for your language and database driver of choice. 10 languages, 25 driver backends: - Rust (sqlx, tokio-postgres) - Python (psycopg3, asyncpg, aiomysql, aiosqlite) - TypeScript (postgres.js, pg, mysql2, better-sqlite3) - Go (pgx, database/sql) - Java & Kotlin (JDBC) - C# (Npgsql, MySqlConnector, Microsoft.Data.Sqlite) - Elixir (Postgrex, MyXQL, Exqlite) - Ruby (pg, mysql2, sqlite3) - PHP (PDO) 3 databases: PostgreSQL, MySQL, SQLite Beyond codegen, Scythe ships with 93 SQL lint rules, SQL formatting, and a migration path from sqlc. If you've used sqlc in Go — this is that idea taken further, for every major backend language. GitHub: https://lnkd.in/ds5sRUEM Docs: https://lnkd.in/dCHW3PVB crates.io: https://lnkd.in/dVk3_r-y #OpenSource #Rust #SQL #Backend #Database #TypeSafe #CodeGeneration #PostgreSQL #MySQL #SQLite #Python #TypeScript #Golang #Java #Kotlin #CSharp #Elixir #Ruby #PHP #DeveloperTools #WebDevelopment #SoftwareEngineering
To view or add a comment, sign in
-
🚀 Built Lightweight Async ORMs for FastAPI (Inspired by LoopBack) While working on FastAPI projects, I got an idea based on my previous experience with LoopBack — what if we could have a simpler ORM with: minimal boilerplate built-in relation loading and straightforward query syntax So I built two async ORMs: oceanic-mysql-orm — built on aiomysql oceanic-postgres-orm — built on asyncpg 💡 Key Features Async-first (no session management) Automatic relation loading (no N+1 issues) Auto-migrate (additive only — never drops columns) Simple dict-based query system SQL echo mode for debugging ⚡ Example users = await connector.find(User, { "where": {"status": "active"}, "include": ["posts"], "limit": 20 }) 🔥 PostgreSQL Extras Soft deletes (deleted_at handled automatically) Raw SQL support when needed Nested includes (orders.items.product) Advanced filters (ilike, regexp, between) ⚠️ Scope This is intentionally designed for simplicity: No complex JOIN builder No multi-database abstraction SQLAlchemy is still a great choice for large, complex systems. This is aimed at the 80% use case where you want to build and ship quickly. 📦 Installation pip install oceanic-mysql-orm pip install oceanic-postgres-orm 🚧 Status Both packages are v1 (early stage). They’re functional, but I’d really value feedback from developers working with FastAPI. 🔗 Full Guide Complete usage guide here: https://lnkd.in/dj5eY4aN
To view or add a comment, sign in
-
We just released mssql-python 1.6, the latest version of our official Python driver for SQL Server, Azure SQL, and SQL databases in Fabric. After shipping Bulk Copy in 1.4 and Apache Arrow in 1.5, this release is about making the driver hold up under real production concurrency. We now release Python's GIL during connection open and close. If you're running a threaded web server (Flask, FastAPI, Django, gunicorn), opening a database connection used to block every other Python thread in the process while DNS, TLS, and authentication completed. That serialization bottleneck is gone. Your other threads keep running while the connection handshake happens in the background. We also fixed: - A crash when using setinputsizes() with SQL_DECIMAL type hints - Incorrect results when iterating catalog methods (cursor.tables(), cursor.columns(), etc.) with fetchone() - "Invalid cursor state" errors when reusing prepared statements - Password leakage in log output for connection strings with special characters like semicolons and braces - Path traversal vulnerabilities in log file configuration pip install --upgrade mssql-python Full blog post: https://lnkd.in/d8y7GS4S #Python #SQLServer #AzureSQL #Microsoft #OpenSource
To view or add a comment, sign in
-
An Introduction to SQL SQL (Structured Query Language) is the standard language for managing and manipulating relational databases. It allows you to create, read, update, and delete data (CRUD operations) in a structured way. ✅ Schemas & basics ✅ Basic CRUD ✅ SELECT basics ✅ JOINs ✅ Aggregation & GROUP BY ✅ Subqueries & CTEs ✅ Window functions ✅ Transactions & concurrency ✅ Indexes & performance Save & share with your team! Follow TheVinia Everywhere Stay connected with TheVinia and keep learning the latest in Web Development, React, and Tech Skills. 🎥 YouTube – Watch tutorials, roadmaps, and coding guides 👉 https://lnkd.in/gfKgVVFf 📸 Instagram – Get daily coding tips, updates, and learning content 👉 https://lnkd.in/gK4S-ah8 💼 Telegram – Follow our journey, insights, and professional updates 👉 https://lnkd.in/gU8M8hwd 💼 Medium : https://lnkd.in/gy9iSHqv ✨ Join our community and grow your tech skills with us. If you found this guide helpful, follow TheDevSpace | Dev Roadmap, w3schools.com, and JavaScript Mastery for more tips, tutorials, and cheat sheets on web development. Let's stay connected! 🚀 #SQL #Databases #Query #Postgres #MySQL
To view or add a comment, sign in
-
🚀 Built My Own URL Shortener using Flask & MySQL! Excited to share my latest mini project — a URL Shortener Web Application 🔗 💡 What it does: This app converts long URLs into short, shareable links and redirects users seamlessly. ⚙️ Tech Stack Used: - Python (Flask) - MySQL Database - HTML & CSS - Hashing (SHA-256) + Base64 Encoding ✨ Key Features: ✔️ Generate unique short URLs ✔️ Store and retrieve links from database ✔️ Redirect to original URL instantly ✔️ Track click counts for each link ✔️ Simple and clean UI 🔍 How it works: - User enters a long URL - System generates a short hash - Data is stored in MySQL - Short URL redirects to original link when accessed 📌 This project helped me understand: - Backend development with Flask - Database integration - URL routing & redirection - Basic system design concepts #Python #Flask #WebDevelopment #Projects #BackendDevelopment #MySQL #Coding #DeveloperJo
To view or add a comment, sign in
-
Day 8/30 — Symptom Checker System (Python + MySQL) Most health apps feel smart… but behind the scenes, they rely on simple logic. So I built one from scratch. 🔹 Project Overview: Developed a backend Symptom Checker System using Python and MySQL that analyzes user-input symptoms and predicts possible diseases based on matching logic. The system simulates real-world healthcare workflows with authentication, history tracking, and severity-based results. 🔹 Tools Used: Python | MySQL | SQL | CLI | Hashing | Logging 🔹 Key Features: • Implemented secure user authentication (SHA-256 hashing) • Designed relational database for diseases and symptoms • Built symptom-to-disease matching algorithm • Calculated match percentage for accurate predictions • Stored user history for tracking past results • Created admin panel for managing medical data • Integrated severity-based disease classification • Added logging for system monitoring 🔹 What I Learned: • Backend system design with real-world logic • Database relationships and query optimization • Authentication and security implementation • Building rule-based recommendation systems • Structuring scalable CLI applications 🔗 GitHub Repository: https://lnkd.in/duF38d8B Would appreciate your feedback and suggestions. #30DaysOfCode #PythonProjects #BackendDevelopment #MySQL #DataStructures #SystemDesign #PortfolioProject #PythonLearning
To view or add a comment, sign in
Explore related topics
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