ar
Feedback

لا تقع ضحية للمخادعين! تيليمتريو يكتشف ويُميّز هذه القنوات 👉 إذا كنت تريد رؤية العلامة، اشترك

Epython Lab

Epython Lab

الذهاب إلى القناة على Telegram

Welcome to Epython Lab, where you can get resources to learn, one-on-one trainings on machine learning, business analytics, and Python, and solutions for business problems. Buy ads: https://telega.io/c/epythonlab

إظهار المزيد
6 046
المشتركون
لا توجد بيانات24 ساعات
-197 أيام
-6330 أيام

جارٍ تحميل البيانات

جذب المشتركين
نوفمبر '26
نوفمبر '26
+11
في 0 قنوات
أكتوبر '26
+27
في 0 قنوات
Get PRO
سبتمبر '26
+22
في 0 قنوات
Get PRO
أغسطس '26
+22
في 0 قنوات
Get PRO
يوليو '26
+35
في 0 قنوات
Get PRO
يونيو '26
+57
في 0 قنوات
Get PRO
مايو '26
+32
في 0 قنوات
Get PRO
أبريل '26
+23
في 0 قنوات
Get PRO
مارس '26
+30
في 0 قنوات
Get PRO
فبراير '26
+18
في 0 قنوات
Get PRO
يناير '26
+22
في 0 قنوات
Get PRO
ديسمبر '25
+43
في 0 قنوات
Get PRO
نوفمبر '25
+23
في 0 قنوات
Get PRO
أكتوبر '25
+14
في 0 قنوات
Get PRO
سبتمبر '25
+32
في 0 قنوات
Get PRO
أغسطس '25
+48
في 0 قنوات
Get PRO
يوليو '25
+32
في 0 قنوات
Get PRO
يونيو '25
+38
في 0 قنوات
Get PRO
مايو '25
+50
في 0 قنوات
Get PRO
أبريل '25
+63
في 0 قنوات
Get PRO
مارس '25
+84
في 0 قنوات
Get PRO
فبراير '25
+64
في 0 قنوات
Get PRO
يناير '25
+96
في 0 قنوات
Get PRO
ديسمبر '24
+43
في 0 قنوات
Get PRO
نوفمبر '24
+79
في 0 قنوات
Get PRO
أكتوبر '24
+111
في 0 قنوات
Get PRO
سبتمبر '24
+66
في 0 قنوات
Get PRO
أغسطس '24
+228
في 0 قنوات
Get PRO
يوليو '24
+75
في 0 قنوات
Get PRO
يونيو '24
+134
في 0 قنوات
Get PRO
مايو '24
+163
في 1 قنوات
Get PRO
أبريل '24
+171
في 0 قنوات
Get PRO
مارس '24
+145
في 0 قنوات
Get PRO
فبراير '24
+140
في 0 قنوات
Get PRO
يناير '24
+450
في 0 قنوات
Get PRO
ديسمبر '23
+141
في 0 قنوات
Get PRO
نوفمبر '23
+198
في 0 قنوات
Get PRO
أكتوبر '23
+421
في 0 قنوات
Get PRO
سبتمبر '23
+263
في 0 قنوات
Get PRO
أغسطس '23
+208
في 0 قنوات
Get PRO
يوليو '23
+84
في 0 قنوات
Get PRO
يونيو '23
+208
في 0 قنوات
Get PRO
مايو '23
+156
في 0 قنوات
Get PRO
أبريل '23
+134
في 0 قنوات
Get PRO
مارس '23
+125
في 0 قنوات
Get PRO
فبراير '23
+95
في 0 قنوات
Get PRO
يناير '23
+473
في 0 قنوات
Get PRO
ديسمبر '22
+97
في 0 قنوات
Get PRO
نوفمبر '22
+100
في 0 قنوات
Get PRO
أكتوبر '22
+100
في 0 قنوات
Get PRO
سبتمبر '22
+74
في 0 قنوات
Get PRO
أغسطس '22
+192
في 0 قنوات
Get PRO
يوليو '22
+122
في 0 قنوات
Get PRO
يونيو '22
+171
في 0 قنوات
Get PRO
مايو '22
+193
في 0 قنوات
Get PRO
أبريل '22
+284
في 0 قنوات
Get PRO
مارس '22
+561
في 0 قنوات
Get PRO
فبراير '22
+175
في 0 قنوات
Get PRO
يناير '22
+411
في 0 قنوات
Get PRO
ديسمبر '21
+178
في 0 قنوات
Get PRO
نوفمبر '21
+77
في 0 قنوات
Get PRO
أكتوبر '21
+172
في 0 قنوات
Get PRO
سبتمبر '21
+68
في 0 قنوات
Get PRO
أغسطس '21
+63
في 0 قنوات
Get PRO
يوليو '21
+172
في 0 قنوات
Get PRO
يونيو '21
+67
في 0 قنوات
Get PRO
مايو '21
+475
في 0 قنوات
Get PRO
أبريل '21
+266
في 0 قنوات
Get PRO
مارس '21
+956
في 0 قنوات
Get PRO
فبراير '21
+256
في 0 قنوات
Get PRO
يناير '21
+42
في 0 قنوات
Get PRO
ديسمبر '20
+1 036
في 0 قنوات
التاريخ
نمو المشتركين
الإشارات
القنوات
22 نوفمبر+1
21 نوفمبر+2
20 نوفمبر0
19 نوفمبر0
18 نوفمبر0
17 نوفمبر0
16 نوفمبر0
15 نوفمبر0
14 نوفمبر+1
13 نوفمبر0
12 نوفمبر0
11 نوفمبر0
10 نوفمبر0
09 نوفمبر+1
08 نوفمبر+2
07 نوفمبر+1
06 نوفمبر0
05 نوفمبر0
04 نوفمبر+1
03 نوفمبر+2
02 نوفمبر0
01 نوفمبر0
منشورات القناة
𝐘𝐨𝐮𝐫 𝐀𝐈 𝐦𝐨𝐝𝐞𝐥 𝐦𝐢𝐠𝐡𝐭 𝐛𝐞 𝐚𝐜𝐜𝐮𝐫𝐚𝐭𝐞 𝐞𝐧𝐨𝐮𝐠𝐡. 𝐁𝐮𝐭 𝐜𝐚𝐧 𝐲𝐨𝐮𝐫 𝐢𝐧𝐟𝐫𝐚𝐬𝐭𝐫𝐮𝐜𝐭𝐮𝐫𝐞 𝐚𝐟𝐟𝐨𝐫𝐝 𝐭𝐨 𝐫𝐮𝐧 𝐢𝐭? We spend a lot of time optimizing model accuracy, reducing inference latency, and improving training performance. But another critical factor can become a bottleneck when deploying AI models: 𝐌𝐞𝐦𝐨𝐫𝐲 𝐜𝐨𝐧𝐬𝐮𝐦𝐩𝐭𝐢𝐨𝐧. This is where understanding 𝐒𝐩𝐚𝐜𝐞 𝐂𝐨𝐦𝐩𝐥𝐞𝐱𝐢𝐭𝐲 becomes important. Consider two Python approaches that produce the same result: ☑️ A list comprehension stores all generated values in memory. ☑️ A generator expression produces values one at a time, avoiding the need to store the entire intermediate collection. The output is the same, but the memory requirements are different. Now think about what happens when you move beyond small Python examples. You are processing millions of records, running inference on resource-constrained devices, deploying models on edge hardware, or serving multiple users simultaneously. Poor memory management can lead to: ☑️ Out-of-memory errors and failed inference requests. ☑️ Higher infrastructure and GPU memory costs. ☑️ Reduced concurrency and throughput. ☑️ Deployment limitations on edge and low-resource devices. 𝐓𝐡𝐢𝐬 𝐢𝐬 𝐰𝐡𝐲 𝐬𝐩𝐚𝐜𝐞 𝐜𝐨𝐦𝐩𝐥𝐞𝐱𝐢𝐭𝐲 𝐢𝐬 𝐦𝐨𝐫𝐞 𝐭𝐡𝐚𝐧 𝐚𝐧 𝐚𝐜𝐚𝐝𝐞𝐦𝐢𝐜 𝐜𝐨𝐧𝐜𝐞𝐩𝐭. 𝐈𝐭 𝐢𝐬 𝐚 𝐩𝐫𝐚𝐜𝐭𝐢𝐜𝐚𝐥 𝐜𝐨𝐧𝐬𝐢𝐝𝐞𝐫𝐚𝐭𝐢𝐨𝐧 𝐢𝐧 𝐛𝐮𝐢𝐥𝐝𝐢𝐧𝐠 𝐬𝐜𝐚𝐥𝐚𝐛𝐥𝐞 𝐀𝐈 𝐬𝐲𝐬𝐭𝐞𝐦𝐬. 𝐖𝐡𝐞𝐧 𝐝𝐞𝐯𝐞𝐥𝐨𝐩𝐢𝐧𝐠 𝐀𝐈 𝐬𝐨𝐥𝐮𝐭𝐢𝐨𝐧𝐬, 𝐝𝐨𝐧'𝐭 𝐣𝐮𝐬𝐭 𝐚𝐬𝐤: "How fast does my algorithm run?" 𝐀𝐥𝐬𝐨 𝐚𝐬𝐤: "How much memory does it require as the input grows?" Because building an AI model that works is one challenge. Building one that works efficiently in production is another. Learn more about what an auxiliary algorithm is https://www.youtube.com/watch?v=1SRtkJsk2LY #ArtificialIntelligence #MachineLearning #Python #SpaceComplexity #MLOps #AIEngineering #SoftwareEngineering #ModelDeployment
19 نوفمبر, 12:47

2
;;;;mm
10
3
Time Complexity https://youtu.be/ri1WCuTwxWY
422
4
🤖 Behind every AI application is more than just a machine learning model. We often focus on model architectures, neural networks, training algorithms, and performance metrics. But the foundations of efficient AI systems also depend on something fundamental: Data Structures. As an AI developer, understanding how to organize and manage data is important when building real-world applications. Consider where different data structures become useful in AI development: 🔹 Lists: Managing sequences, records, and collections of data. 🔹 Dictionaries: Mapping feature names, model configurations, and lookup results. 🔹 Sets: Removing duplicates and maintaining unique identifiers or labels. 🔹 Queues: Managing incoming requests in asynchronous data and inference pipelines. 🔹 Heaps: Finding top-ranked results and implementing priority-based processing. 🔹 Trees: Supporting decision trees, hierarchical data, and search operations. Understanding these structures also helps you reason about time complexity, memory usage, and system performance. Building AI is not just about choosing the right model. It's also about building efficient systems around it. 🔗 Explore more: https://www.youtube.com/watch?v=9LImjTMUHX0 #ArtificialIntelligence #AIEngineering #Python #MachineLearning #DataStructures #Algorithms #SoftwareEngineering
544
5
𝐈 𝐬𝐩𝐞𝐞𝐝 𝐮𝐩 𝐩𝐚𝐧𝐝𝐚𝐬 𝐛𝐲 𝟏𝟎𝟎𝐱, 𝐚𝐧𝐝 𝐡𝐞𝐫𝐞 𝐢𝐬 𝐞𝐱𝐚𝐜𝐭𝐥𝐲 𝐡𝐨𝐰 𝐲𝐨𝐮 𝐜𝐚𝐧 𝐭𝐨𝐨. 🚀 If your DataFrame manipulation feels lightning-fast on a small sample but crawls to a halt on a million rows, you are likely falling into a few common performance traps. Here are the 3 core optimizations that drove a massive speedup: 1️⃣ 𝐃𝐢𝐭𝐜𝐡 .𝚒𝚝𝚎𝚛𝚛𝚘𝚠𝚜() 𝐟𝐨𝐫 𝐕𝐞𝐜𝐭𝐨𝐫𝐢𝐳𝐚𝐭𝐢𝐨𝐧 Row-by-row looping forces Pandas to create a Series object for every row, bypassing C-level optimizations. Let NumPy and Pandas handle your array math natively. ❌ 𝐒𝐥𝐨𝐰 (𝐑𝐨𝐰-𝐛𝐲-𝐫𝐨𝐰 𝐢𝐭𝐞𝐫𝐚𝐭𝐢𝐨𝐧): 𝚏𝚘𝚛 𝚒, 𝚛𝚘𝚠 𝚒𝚗 𝚍𝚏.𝚒𝚝𝚎𝚛𝚛𝚘𝚠𝚜(): 𝚍𝚏.𝚕𝚘𝚌[𝚒, "𝚝𝚘𝚝𝚊𝚕"] = 𝚛𝚘𝚠["𝚙𝚛𝚒𝚌𝚎"] * 𝚛𝚘𝚠["𝚚𝚞𝚊𝚗𝚝𝚒𝚝𝚢"] ✅ 𝟏𝟎𝟎𝐱 𝐅𝐚𝐬𝐭𝐞𝐫 (𝐕𝐞𝐜𝐭𝐨𝐫𝐢𝐳𝐞𝐝 𝐨𝐩𝐞𝐫𝐚𝐭𝐢𝐨𝐧): 𝚍𝚏["𝚝𝚘𝚝𝚊𝚕"] = 𝚍𝚏["𝚙𝚛𝚒𝚌𝚎"] * 𝚍𝚏["𝚚𝚞𝚊𝚗𝚝𝚒𝚝𝚢"] 2️⃣ 𝐒𝐮𝐩𝐞𝐫𝐜𝐡𝐚𝐫𝐠𝐞 𝐌𝐮𝐥𝐭𝐢-𝐂𝐨𝐥𝐮𝐦𝐧 𝐌𝐚𝐭𝐡 𝐰𝐢𝐭𝐡 𝚙𝚍.𝚎𝚟𝚊𝚕() # 𝙴𝚕𝚒𝚖𝚒𝚗𝚊𝚝𝚎𝚜 𝚝𝚎𝚖𝚙𝚘𝚛𝚊𝚛𝚢 𝚖𝚎𝚖𝚘𝚛𝚢 𝚊𝚕𝚕𝚘𝚌𝚊𝚝𝚒𝚘𝚗 𝚘𝚟𝚎𝚛𝚑𝚎𝚊𝚍 𝚍𝚏["𝚛𝚎𝚜𝚞𝚕𝚝"] = 𝚙𝚍.𝚎𝚟𝚊𝚕("𝚌𝚘𝚕𝟷 + 𝚌𝚘𝚕𝟸 * 𝚌𝚘𝚕𝟹 - 𝚌𝚘𝚕𝟺", 𝚝𝚊𝚛𝚐𝚎𝚝=𝚍𝚏) 3️⃣ 𝐃𝐨𝐰𝐧𝐜𝐚𝐬𝐭 𝐃𝐚𝐭𝐚 𝐓𝐲𝐩𝐞𝐬 & 𝐔𝐬𝐞 𝐂𝐚𝐭𝐞𝐠𝐨𝐫𝐢𝐜𝐚𝐥𝐬 By default, Pandas assigns 64-bit integers/floats and treats string columns as bloated 𝚘𝚋𝚓𝚎𝚌𝚝 types. Downcasting your numbers and converting repeating strings to 𝚌𝚊𝚝𝚎𝚐𝚘𝚛𝚢 can shrink your memory footprint by up to 80%—drastically accelerating every subsequent operation. # 𝙳𝚘𝚠𝚗𝚌𝚊𝚜𝚝 𝚗𝚞𝚖𝚎𝚛𝚒𝚌𝚜 & 𝚖𝚊𝚙 𝚜𝚝𝚛𝚒𝚗𝚐𝚜 𝚝𝚘 𝚌𝚊𝚝𝚎𝚐𝚘𝚛𝚢 𝚍𝚏["𝚒𝚍"] = 𝚙𝚍.𝚝𝚘_𝚗𝚞𝚖𝚎𝚛𝚒𝚌(𝚍𝚏["𝚒𝚍"], 𝚍𝚘𝚠𝚗𝚌𝚊𝚜𝚝="𝚒𝚗𝚝𝚎𝚐𝚎𝚛") 𝚍𝚏["𝚛𝚎𝚐𝚒𝚘𝚗"] = 𝚍𝚏["𝚛𝚎𝚐𝚒𝚘𝚗"].𝚊𝚜𝚝𝚢𝚙𝚎("𝚌𝚊𝚝𝚎𝚐𝚘𝚛𝚢") 💡 𝐓𝐡𝐞 𝐓𝐚𝐤𝐞𝐚𝐰𝐚𝐲: Optimize your code at the vector and memory level before throwing expensive compute clusters or hardware upgrades at the problem. What is your favorite performance trick for handling large datasets? Let’s share notes in the comments below! 👇 Explore more https://youtu.be/3vX1S2qxDu8 #Python #Pandas #DataScience #DataEngineering #CodeOptimization #MachineLearning #Programming
548
6
🚀 I’m Open to New Opportunities in Python, Machine Learning, and Data Engineering! I’m looking to connect with individuals, teams, and organizations where I can use my technical skills to solve real-world problems, share knowledge, and create meaningful impact. Here are three areas where I’d love to contribute: 🔹 Content Creation & Technical Education Creating practical, engaging tutorials on Python, Machine Learning, and Data Engineering to help developers learn, build, and grow. 🔹 Backend Development & AI Engineering Building reliable backend systems, ML-powered applications, and APIs using Python, FastAPI, and modern AI/ML technologies. 🔹 Mentoring & Knowledge Sharing Helping aspiring developers strengthen their Python, Machine Learning, and Data Engineering skills through practical guidance and project-based learning. 💡 What am I looking for? Opportunities to collaborate on exciting projects, contribute to impactful teams, create educational content, and mentor the next generation of developers. If you’re hiring, building something interesting, or know someone looking for these skills, I’d love to connect! 📩 Feel free to send me a message or tag someone who might be interested. Let’s build something meaningful together. #Python #MachineLearning #DataEngineering #FastAPI #AI #BackendDevelopment #Mentorship #ContentCreation #OpenToOpportunities
499
7
Speed Up Pandas: 3 Performance Tips for Faster Dataframes https://youtu.be/3vX1S2qxDu8
Speed Up Pandas: 3 Performance Tips for Faster Dataframes https://youtu.be/3vX1S2qxDu8
437
8
AI-Generated Python Code Is Not Always Correct | Code Review https://youtu.be/mJLwFf0dHSA
432
9
Stop Accepting AI Code Without Reading It | Review AI-Generated Code https://youtu.be/mfqI3w4Npsc
495
10
As I continue building my AI Document API with FastAPI, I’m reminding myself to look beyond the happy path. It’s easy to test an endpoint with valid data and celebrate when everything works. But what happens when: - The client sends invalid data? - The requested document doesn't exist? - A database operation fails? - A user tries to access something they aren't authorized to access? For me, the goal isn’t simply to make each endpoint work. It’s to understand how it behaves when things go wrong, too. That’s one of the things I’m exploring as I build this project step by step with FastAPI. A good API should handle the expected path well and fail predictably when things go wrong. As developers, we should test more than whether our code works. We should also test how it fails. When reviewing an API endpoint, what do you check first: input validation, error handling, or authorization? 🔗 GitHub project: https://github.com/epythonlab2/ai-document-api 🎥 Follow the FastAPI course series: https://www.youtube.com/watch?v=0SLLG2Z_Htw&list=PLQNCas8_eikM #FastAPI #Python #APIDevelopment #BackendDevelopment #SoftwareEngineering
610
11
As I build my 𝐀𝐈 𝐃𝐨𝐜𝐮𝐦𝐞𝐧𝐭 𝐀𝐏𝐈 𝐰𝐢𝐭𝐡 𝐅𝐚𝐬𝐭𝐀𝐏𝐈, I’m realizing that building an API is about much more than writing endpoints. Getting an endpoint to work is just the beginning. A real application needs a solid structure and several pieces working together. That means thinking about: - Validating incoming data - Organizing routes and business logic - Connecting to a database - Handling errors properly - Implementing authentication and permissions - Testing and deploying the application Each step introduces a new challenge and a new concept to learn. That’s why I’m building this project step by step as part of my 𝐅𝐚𝐬𝐭𝐀𝐏𝐈 𝐬𝐞𝐫𝐢𝐞𝐬. My goal is to go beyond isolated examples and demonstrate how these concepts come together in a practical AI application. 𝐁𝐞𝐜𝐚𝐮𝐬𝐞 𝐥𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐚 𝐟𝐫𝐚𝐦𝐞𝐰𝐨𝐫𝐤 𝐢𝐬 𝐨𝐧𝐞 𝐭𝐡𝐢𝐧𝐠. 𝐊𝐧𝐨𝐰𝐢𝐧𝐠 𝐡𝐨𝐰 𝐭𝐨 𝐮𝐬𝐞 𝐢𝐭 𝐭𝐨 𝐛𝐮𝐢𝐥𝐝 𝐚 𝐫𝐞𝐚𝐥 𝐚𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐢𝐬 𝐚𝐧𝐨𝐭𝐡𝐞𝐫. 🔗 GitHub repository: https://github.com/epythonlab2/ai-document-api 🎥 Explore the full course series: https://www.youtube.com/watch?v=0SLLG2Z_Htw&list=PLQNCas8_eikM 𝐖𝐡𝐚𝐭 𝐝𝐨 𝐲𝐨𝐮 𝐟𝐢𝐧𝐝 𝐦𝐨𝐬𝐭 𝐜𝐡𝐚𝐥𝐥𝐞𝐧𝐠𝐢𝐧𝐠 𝐰𝐡𝐞𝐧 𝐭𝐮𝐫𝐧𝐢𝐧𝐠 𝐚 𝐬𝐢𝐦𝐩𝐥𝐞 𝐀𝐏𝐈 𝐢𝐧𝐭𝐨 𝐚 𝐜𝐨𝐦𝐩𝐥𝐞𝐭𝐞 𝐚𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧? #FastAPI #Python #APIDevelopment #BackendDevelopment #AIEngineering
627
12
FastAPI Fundamentals Course Tutorial Episode 10: Insert/Create Data into PostgreSQL Database https://youtu.be/w3EUk1MuJfE
565
13
While learning FastAPI, I came across another question: 𝐖𝐡𝐲 𝐝𝐨 𝐈 𝐧𝐞𝐞𝐝 𝐏𝐲𝐝𝐚𝐧𝐭𝐢𝐜 𝐰𝐡𝐞𝐧 𝐏𝐲𝐭𝐡𝐨𝐧 𝐚𝐥𝐫𝐞𝐚𝐝𝐲 𝐡𝐚𝐬 𝐭𝐲𝐩𝐞 𝐡𝐢𝐧𝐭𝐬? For example, I can write: 𝑑𝑒𝑓 𝑐𝑟𝑒𝑎𝑡𝑒_𝑢𝑠𝑒𝑟(𝑛𝑎𝑚𝑒: 𝑠𝑡𝑟, 𝑎𝑔𝑒: 𝑖𝑛𝑡): ... Python already tells me that name should be a string and age should be an integer. So what does 𝐏𝐲𝐝𝐚𝐧𝐭𝐢c add? The difference became clear when working with API request data. An API receives data from outside the application, and I need more than just type hints. I need to validate that the data has the expected structure and values. That’s where Pydantic becomes useful. With FastAPI, I can define a model: 𝑐𝑙𝑎𝑠𝑠 𝑈𝑠𝑒𝑟𝐶𝑟𝑒𝑎𝑡𝑒(𝐵𝑎𝑠𝑒𝑀𝑜𝑑𝑒𝑙): 𝑛𝑎𝑚𝑒: 𝑠𝑡𝑟 𝑎𝑔𝑒: 𝑖𝑛𝑡 FastAPI can then use that model to validate incoming request data automatically. So my takeaway is: 𝐏𝐲𝐭𝐡𝐨𝐧 𝐭𝐲𝐩𝐞 𝐡𝐢𝐧𝐭𝐬 𝐝𝐞𝐬𝐜𝐫𝐢𝐛𝐞 𝐰𝐡𝐚𝐭 𝐈 𝐞𝐱𝐩𝐞𝐜𝐭. 𝐏𝐲𝐝𝐚𝐧𝐭𝐢𝐜 𝐡𝐞𝐥𝐩𝐬 𝐯𝐚𝐥𝐢𝐝𝐚𝐭𝐞 𝐰𝐡𝐚𝐭 𝐈 𝐚𝐜𝐭𝐮𝐚𝐥𝐥𝐲 𝐫𝐞𝐜𝐞𝐢𝐯𝐞. This is another small concept that became much clearer once I started building a real FastAPI application. 𝐖𝐡𝐚𝐭 𝐰𝐚𝐬 𝐲𝐨𝐮𝐫 𝐟𝐢𝐫𝐬𝐭 𝐢𝐦𝐩𝐫𝐞𝐬𝐬𝐢𝐨𝐧 𝐨𝐟 𝐏𝐲𝐝𝐚𝐧𝐭𝐢𝐜 𝐰𝐡𝐞𝐧 𝐲𝐨𝐮 𝐬𝐭𝐚𝐫𝐭𝐞𝐝 𝐮𝐬𝐢𝐧𝐠 𝐅𝐚𝐬𝐭𝐀𝐏𝐈? 🔗 𝐆𝐢𝐭𝐇𝐮𝐛: https://github.com/epythonlab2/ai-document-api 🎥 𝐅𝐚𝐬𝐭𝐀𝐏𝐈 𝐜𝐨𝐮𝐫𝐬𝐞: https://www.youtube.com/watch?v=0SLLG2Z_Htw&list=PLQNCas8_eikM
572
14
✅ FastAPI Episode 9: Database Setup with PostgreSQL & SQLAlchemy https://youtu.be/4d4Gs2Y7Fic
517
15
The FastAPI Course Github (AI Document API) Project is just updated Add database connection setup and document model definition - Implement database connection using SQLAlchemy and environment variables - Create Document model with fields for title, description, category, and priority - Update .gitignore to include .env file - Add required dependencies in pyproject.toml and uv.lock 🔗 𝐆𝐢𝐭𝐇𝐮𝐛: https://github.com/epythonlab2/ai-document-api 🎥 𝐅𝐚𝐬𝐭𝐀𝐏𝐈 𝐜𝐨𝐮𝐫𝐬𝐞: https://www.youtube.com/watch?v=0SLLG2Z_Htw&list=PLQNCas8_eikM
554
16
While moving from other web frameworks to 𝐅𝐚𝐬𝐭𝐀𝐏𝐈, one question came to my mind: 𝐖𝐡𝐲 𝐝𝐨 𝐈 𝐧𝐞𝐞𝐝 𝐀𝐏𝐈𝐑𝐨𝐮𝐭𝐞𝐫 𝐰𝐡𝐞𝐧 𝐅𝐚𝐬𝐭𝐀𝐏𝐈 𝐚𝐥𝐫𝐞𝐚𝐝𝐲 𝐥𝐞𝐭𝐬 𝐦𝐞 𝐝𝐞𝐟𝐢𝐧𝐞 𝐫𝐨𝐮𝐭𝐞𝐬 𝐝𝐢𝐫𝐞𝐜𝐭𝐥𝐲? For a small project, this is enough: @𝒂𝒑𝒑.𝒈𝒆𝒕("/𝒅𝒐𝒄𝒖𝒎𝒆𝒏𝒕𝒔") 𝒂𝒔𝒚𝒏𝒄 𝒅𝒆𝒇 𝒈𝒆𝒕_𝒅𝒐𝒄𝒖𝒎𝒆𝒏𝒕𝒔(): ... So why introduce APIRouter? The answer became clearer when I started thinking about a real application. As the project grows, I may have authentication, users, documents, search, AI processing, and many more endpoints. Keeping all of these routes in one place can quickly become difficult to maintain. That’s where APIRouter becomes useful. It allows me to organize routes by feature and keep the application structure clean. So my takeaway is simple: 𝐅𝐚𝐬𝐭𝐀𝐏𝐈 𝐥𝐞𝐭𝐬 𝐦𝐞 𝐝𝐞𝐟𝐢𝐧𝐞 𝐭𝐡𝐞 𝐫𝐨𝐮𝐭𝐞𝐬. 𝐀𝐏𝐈𝐑𝐨𝐮𝐭𝐞𝐫 𝐡𝐞𝐥𝐩𝐬 𝐦𝐞 𝐨𝐫𝐠𝐚𝐧𝐢𝐳𝐞 𝐭𝐡𝐞𝐦. It’s not required to make FastAPI work. It becomes useful when I want the application to stay organized and maintainable as it grows. This was one of those small FastAPI concepts that made much more sense once I started looking at the bigger picture. 𝐇𝐚𝐯𝐞 𝐲𝐨𝐮 𝐡𝐚𝐝 𝐭𝐡𝐞 𝐬𝐚𝐦𝐞 𝐪𝐮𝐞𝐬𝐭𝐢𝐨𝐧 𝐰𝐡𝐞𝐧 𝐦𝐨𝐯𝐢𝐧𝐠 𝐭𝐨 𝐅𝐚𝐬𝐭𝐀𝐏𝐈? 🔗 𝐆𝐢𝐭𝐇𝐮𝐛: https://github.com/epythonlab2/ai-document-api 🎥 𝐅𝐚𝐬𝐭𝐀𝐏𝐈 𝐜𝐨𝐮𝐫𝐬𝐞: https://www.youtube.com/watch?v=0SLLG2Z_Htw&list=PLQNCas8_eikM #FastAPI #Python #APIRouter #BackendDevelopment #SoftwareArchitecture #APIDevelopment #PythonDeveloper
510
17
This is the github starter for the project based FastAPI course tutorial https://github.com/epythonlab2/ai-document-api
487
18
✅ FastAPI Episode 8: Organizing Routes with APIRouter https://youtu.be/SGPXI7bzEDM
503
19
When building a FastAPI application, I pay close attention to how data is validated before it reaches the business logic. That is where Pydantic becomes particularly useful. Pydantic lets us define the structure and rules for the data our application accepts, instead of scattering validation checks throughout the codebase. I use it to define and enforce the data contract at the application boundary. For example: 𝑐𝑙𝑎𝑠𝑠 𝑃𝑟𝑜𝑐𝑒𝑠𝑠𝑖𝑛𝑔𝐶𝑜𝑛𝑓𝑖𝑔(𝐵𝑎𝑠𝑒𝑀𝑜𝑑𝑒𝑙): 𝑐ℎ𝑢𝑛𝑘_𝑠𝑖𝑧𝑒: 𝑖𝑛𝑡 = 𝐹𝑖𝑒𝑙𝑑(𝑔𝑡=0) 𝑜𝑣𝑒𝑟𝑙𝑎𝑝: 𝑖𝑛𝑡 = 𝐹𝑖𝑒𝑙𝑑(𝑔𝑒=0) @𝑚𝑜𝑑𝑒𝑙_𝑣𝑎𝑙𝑖𝑑𝑎𝑡𝑜𝑟(𝑚𝑜𝑑𝑒="𝑎𝑓𝑡𝑒𝑟") 𝑑𝑒𝑓 𝑣𝑎𝑙𝑖𝑑𝑎𝑡𝑒_𝑐𝑜𝑛𝑓𝑖𝑔(𝑠𝑒𝑙𝑓): 𝑖𝑓 𝑠𝑒𝑙𝑓.𝑜𝑣𝑒𝑟𝑙𝑎𝑝 >= 𝑠𝑒𝑙𝑓.𝑐ℎ𝑢𝑛𝑘_𝑠𝑖𝑧𝑒: 𝑟𝑎𝑖𝑠𝑒 𝑉𝑎𝑙𝑢𝑒𝐸𝑟𝑟𝑜𝑟("𝑜𝑣𝑒𝑟𝑙𝑎𝑝 𝑚𝑢𝑠𝑡 𝑏𝑒 𝑠𝑚𝑎𝑙𝑙𝑒𝑟 𝑡ℎ𝑎𝑛 𝑐ℎ𝑢𝑛𝑘_𝑠𝑖𝑧𝑒") 𝑟𝑒𝑡𝑢𝑟𝑛 𝑠𝑒𝑙𝑓 Both fields can be individually valid, while their combination is not. That is the difference between: Field validation → Is this value valid? Model validation → Is this combination valid? With Pydantic, 𝙁𝙞𝙚𝙡𝙙(), 𝙛𝙞𝙚𝙡𝙙_𝙫𝙖𝙡𝙞𝙙𝙖𝙩𝙤𝙧(), 𝙖𝙣𝙙 𝙢𝙤𝙙𝙚𝙡_𝙫𝙖𝙡𝙞𝙙𝙖𝙩𝙤𝙧() let us keep these rules close to the schema. The result is a cleaner boundary: 𝙍𝙚𝙦𝙪𝙚𝙨𝙩 → 𝙑𝙖𝙡𝙞𝙙𝙖𝙩𝙞𝙤𝙣 → 𝘽𝙪𝙨𝙞𝙣𝙚𝙨𝙨 𝙇𝙤𝙜𝙞𝙘 → 𝘿𝙖𝙩𝙖𝙗𝙖𝙨𝙚 / 𝘼𝙄 For production AI applications, this matters. Document metadata, processing parameters, search filters, and structured AI outputs all need predictable contracts. Good schemas do more than describe data. They protect the rest of the system. You can explore more: https://www.youtube.com/playlist?list=PLQNCas8_eikM #Python #Pydantic #PydanticV2 #FastAPI #BackendEngineering #AIEngineering
541
20
FastAPI Episode 7: Advanced Pydentic Model Design https://www.youtube.com/watch?v=j4lLM6tWKKk
507