<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anandhu AS on Medium]]></title>
        <description><![CDATA[Stories by Anandhu AS on Medium]]></description>
        <link>https://medium.com/@anandhu_as?source=rss-3511e9adb6e2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ooJEFcDlYmt5ywa1pCds3Q.jpeg</url>
            <title>Stories by Anandhu AS on Medium</title>
            <link>https://medium.com/@anandhu_as?source=rss-3511e9adb6e2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 15:49:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anandhu_as/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Boost Your API Speeds by Implementing Redis Caching| Integrating with FastAPI]]></title>
            <link>https://python.plainenglish.io/how-to-boost-your-api-speeds-by-implementing-redis-caching-integrating-with-fastapi-cd02b41104cf?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd02b41104cf</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[redis]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 03:01:03 GMT</pubDate>
            <atom:updated>2026-07-08T09:45:32.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Boost Your API Speeds by Implementing Redis Caching</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*uADxE5YM5StjUy58" /></figure><p>If you have worked with backends of any sort, you might be familiar with the word caching, at its core, caching is the process of storing a copy of data in a temporary, high-speed storage so that future requests for that same data can be served much faster.</p><p>Redis is an in-memory database, meaning it stores data on the server’s RAM, since reading from RAM is much faster than reading from a hard disk. Redis can perform operations in a fraction of a millisecond.</p><p>If you are not familiar with Fast API, I recommend reading: <a href="https://python.plainenglish.io/getting-started-with-fastapi-in-2025-a-beginners-guide-b80111d09955">Getting Started with FastAPI in 2025: A Beginner’s Guide | by Anandhu AS | Python in Plain English</a></p><p>I am running Redis on Docker inside a Windows machine. If your machine has Docker installed, you can follow along (Things are much easier in MAC and Linux).</p><p>Step 1 =&gt; open CMD and run (Pull the Redis image)</p><pre>docker pull redis:7</pre><p>Step 2 =&gt; Run Redis, name the container redis, and expose it on port 6379</p><pre>docker run -d --name redis -p 6379:6379 redis:7</pre><p>Step 3 =&gt; Verify it is running</p><pre>docker ps</pre><p>If everything works, you will see something like container ID, Image name, and exposed port.</p><p>Step 1: Once the Fast API app is created, install these dependencies</p><pre>pip install redis httpxp</pre><p>Step 2: Here Redis is initialized on app start, endpoint (“/entries”) is fetching a public API, if entire exist in Redis it is served right away, if not data is fetched, cached in Redis and served.</p><pre>//main.py<br><br>from contextlib import asynccontextmanager<br>from fastapi import FastAPI<br>from redis.asyncio import Redis<br>import httpx<br>import json<br><br>@asynccontextmanager<br>async def lifespan(app: FastAPI):<br>    app.state.redis = Redis(host=&quot;localhost&quot;, port=6379)<br>    app.state.http_client = httpx.AsyncClient()<br><br>    yield<br><br>    await app.state.http_client.aclose()<br>    await app.state.redis.aclose()<br><br>app = FastAPI(lifespan=lifespan)<br><br>@app.get(&#39;/entries&#39;)<br>async def read_items():<br><br>    value = await app.state.redis.get(&#39;entries&#39;)<br><br>    if value is None:<br>        response = await app.state.http_client.get<br>        (&#39;https://jsonplaceholder.typicode.com/posts&#39;)<br>        value = response.json()<br>        data_str = json.dumps(value)<br>        await app.state.redis.set(&quot;entries&quot;, data_str)<br><br>    return json.loads(value) </pre><p>Step 3 =&gt; Testing the API, use (/docs) to open Fast API’s built-in API documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*Ux7FwetLI4j1OY-v" /></figure><p>Here we can see the first call took 343ms, once the data is cached, the consecutive calls are lightning fast, taking only less than 12ms.</p><p>I hope you got to learn something new. Thanks for reading.</p><p><em>Originally published at </em><a href="https://www.linkedin.com/pulse/how-boost-your-api-speeds-implementing-redis-caching-anandhu-as-zrqif/"><em>https://www.linkedin.com</em></a><em>.</em></p><h3>Before you go</h3><ul><li>Please take a moment to like the post and follow the writer!</li><li>Did you know that over 400,000 developers share what they’re building, learning, and discovering across our platforms every month? Learn how you can contribute <a href="https://plainenglish.io/write-for-us">here</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd02b41104cf" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/how-to-boost-your-api-speeds-by-implementing-redis-caching-integrating-with-fastapi-cd02b41104cf">How to Boost Your API Speeds by Implementing Redis Caching| Integrating with FastAPI</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Agentic Skills Matter: A Real-World Auth0 Implementation]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://javascript.plainenglish.io/why-agentic-skills-matter-a-real-world-auth0-implementation-cd9737a3d0ca?source=rss-3511e9adb6e2------2"><img src="https://cdn-images-1.medium.com/max/1906/1*raZTjRsnPAMRUEBPfUIBcQ.png" width="1906"></a></p><p class="medium-feed-snippet">At this point, I don&#x2019;t think anyone needs an explanation on Agentic Skills; In simple terms, it is a set of prewritten instructions for&#x2026;</p><p class="medium-feed-link"><a href="https://javascript.plainenglish.io/why-agentic-skills-matter-a-real-world-auth0-implementation-cd9737a3d0ca?source=rss-3511e9adb6e2------2">Continue reading on JavaScript in Plain English »</a></p></div>]]></description>
            <link>https://javascript.plainenglish.io/why-agentic-skills-matter-a-real-world-auth0-implementation-cd9737a3d0ca?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd9737a3d0ca</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[auth0]]></category>
            <category><![CDATA[agentic-skills]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 13:40:44 GMT</pubDate>
            <atom:updated>2026-03-29T18:04:32.367Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[I switched from Angular to React, and it feels liberating.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://javascript.plainenglish.io/i-switched-from-angular-to-react-and-it-feels-liberating-5d38cff395c6?source=rss-3511e9adb6e2------2"><img src="https://cdn-images-1.medium.com/max/2600/0*12mUm93SjJcQLP7k" width="4506"></a></p><p class="medium-feed-snippet">Things I learned switching from Angular to React.</p><p class="medium-feed-link"><a href="https://javascript.plainenglish.io/i-switched-from-angular-to-react-and-it-feels-liberating-5d38cff395c6?source=rss-3511e9adb6e2------2">Continue reading on JavaScript in Plain English »</a></p></div>]]></description>
            <link>https://javascript.plainenglish.io/i-switched-from-angular-to-react-and-it-feels-liberating-5d38cff395c6?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d38cff395c6</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Tue, 21 Oct 2025 08:39:35 GMT</pubDate>
            <atom:updated>2025-10-21T08:39:35.755Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Cloud Firestore for Python Developers: The Quick Start Guide]]></title>
            <link>https://medium.com/@anandhu_as/cloud-firestore-for-python-developers-the-quick-start-guide-ec5d87e16976?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec5d87e16976</guid>
            <category><![CDATA[cloud-firestore]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Fri, 22 Aug 2025 20:53:12 GMT</pubDate>
            <atom:updated>2025-08-22T22:54:40.486Z</atom:updated>
            <content:encoded><![CDATA[<h4>We will learn how to use <strong>Cloud Firestore, a </strong>document-oriented database provided as a service in Firebase.</h4><p>Firebase offers two types of databases</p><ol><li>Firebase Realtime Database</li><li>Cloud Firestore</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t7HkuwE3Kvb8D5Mj" /><figcaption>Photo by <a href="https://unsplash.com/@imgix?utm_source=medium&amp;utm_medium=referral">imgix</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>While both have their own benefits, <strong>Cloud Firestore </strong>is more suited for enterprise applications.</p><p><a href="https://firebase.google.com/docs/database/rtdb-vs-firestore">Choose a Database: Cloud Firestore or Realtime Database | Firebase Realtime Database</a></p><h3>How to create a Database?</h3><ol><li>Go to the <a href="https://console.firebase.google.com/u/0/">Firebase console</a> and create a project if you don’t have one.</li><li>From the side navigation, select <strong>Build </strong>&gt; <strong>Firestore Database</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FqKO4mH63D3fSBbW1osSYQ.png" /></figure><p>3. To create a DB, you will be asked to select a region, select a region near your user to reduce latency.</p><p>4. Once the DB is created, you will be navigated to a screen like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yOxzMmqo8zlWbheK4CWy3Q.png" /></figure><p>5. <strong>Collection </strong>is like a table in an SQL database (or a place where the document is stored).</p><p>The random string in the second column is the <strong>ID</strong> of the document.<br>It is used to refer to the data in the collection.</p><p>The third column is the actual data stored in the document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3mpKsH9swPbvbckuwJ0BaQ.png" /></figure><h3>CRUD with Cloud Firestore</h3><p>Here I am using Python to connect with the database</p><ol><li>Go to project settings(Gear icon near project overview) &gt; Service account&gt; Python(or language you prefer)&gt; Generate the key</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDGGXgNdFoVwNSSVTVEUMQ.png" /></figure><p>The key will be downloaded as a JSON file</p><p>2. This is the code you will get in the previous step. This piece of code initializes Firebase in your project</p><pre>import firebase_admin<br>from firebase_admin import credentials<br><br>cred = credentials.Certificate(&quot;path/to/serviceAccountKey.json&quot;)<br>firebase_admin.initialize_app(cred)p</pre><p>Create a Python virtual environment and run pip install firebase-admin</p><p>After running this command, create a .py file and paste the above code.</p><p><strong><em>cred = credentials.Certificate(“path/to/serviceAccountKey.json”)</em></strong></p><p><strong><em>The path in the code should match the path to the private key downloaded in the previous step. It is better to keep the private key in the project folder when the app is in development.</em></strong></p><p>3. Initialize the database</p><p>This code initializes the DB</p><pre>import firebase_admin<br>from firebase_admin import credentials<br>from firebase_admin import firestore<br><br>cred = credentials.Certificate(r&quot;C:\Firebase\test-5345w-firebase-adminsdk-fbsvc-503acd9t1ftd.json&quot;)<br>firebase_admin.initialize_app(cred)<br><br>db = firestore.client()</pre><p><strong>POST Operation</strong></p><p>This code snippet creates a collection named ‘newCollection’ if it doesn’t exist, and then adds the data into the collection with an auto-generated ID for referring to the document.</p><pre>def create_document(collection_name, data):<br>    &quot;&quot;&quot;Create a new document&quot;&quot;&quot;<br>    try:<br>            doc_ref = db.collection(collection_name).add(data)<br>            new_doc_id = doc_ref[1].id<br>            print(f&quot;Document created with ID: {new_doc_id}&quot;)<br>            return new_doc_id<br>    except Exception as e:<br>        print(f&quot;Error creating document: {e}&quot;)<br>        return None<br><br>create_document(&#39;newCollection&#39;,{&#39;fruit&#39;:&#39;Apple&#39;})</pre><p><strong>PUT Operation</strong></p><p>This function takes in the collection name, document ID, and data to be updated. If ID doesn’t exist, it will raise error 404.</p><pre>def update_document(collection_name, doc_id, data):<br>    &quot;&quot;&quot;Update an existing document&quot;&quot;&quot;<br>    try:        <br>        db.collection(collection_name).document(doc_id).update(data)<br>        print(f&quot;Document {doc_id} updated successfully&quot;)<br>        return True<br>    except Exception as e:<br>        print(f&quot;Error updating document: {e}&quot;)<br>        return False<br>    <br>update_document(&#39;newCollection&#39;,&#39;VJGe2IDQGdqND2n3yoLy&#39;,{&#39;fruit&#39;:&#39;orange&#39;})</pre><p><strong>Delete Operation</strong></p><p>This function accepts the collection name and document ID.</p><pre>def delete_document(collection_name, doc_id):<br>    &quot;&quot;&quot;Delete a document&quot;&quot;&quot;<br>    try:<br>        db.collection(collection_name).document(doc_id).delete()<br>        print(f&quot;Document {doc_id} deleted successfully&quot;)<br>        return True<br>    except Exception as e:<br>        print(f&quot;Error deleting document: {e}&quot;)<br>        return False<br><br>delete_document(&#39;newCollection&#39;,&#39;VJGe2IDQGdqND2n3yoLy&#39;)</pre><p><strong>Get Operation</strong></p><p>This function returns all the documents in a collection<br>We can further optimize the operation by only fetching data that satisfies a<br>specific conditions.</p><pre>def get_all_documents(collection_name):<br>    &quot;&quot;&quot;Get all documents from collection&quot;&quot;&quot;<br>    try:<br>        docs = db.collection(collection_name).stream()<br>        documents = []<br>        <br>        for doc in docs:<br>            data = doc.to_dict()<br>            data[&#39;id&#39;] = doc.id  # Include document ID<br>            documents.append(data)<br>        <br>        print(f&quot;Found {len(documents)} documents&quot;)<br>        return documents<br>    except Exception as e:<br>        print(f&quot;Error: {e}&quot;)<br>        return []<br>    <br>get_all_documents(&#39;newCollection&#39;)</pre><p>Cloud Firestore is a powerful NoSQL database that integrates seamlessly with Firebase services. In this guide, we:</p><ul><li>Set up Firestore with Python</li><li>Learned how to <strong>create, update, delete, and fetch documents</strong></li></ul><p>With this foundation, you can build applications that store and query structured data efficiently.<br> I hope this was worth your time. Always open to suggestions and improvements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec5d87e16976" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with FastAPI in 2025: A Beginner’s Guide]]></title>
            <link>https://python.plainenglish.io/getting-started-with-fastapi-in-2025-a-beginners-guide-b80111d09955?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b80111d09955</guid>
            <category><![CDATA[fastapi-pydantic]]></category>
            <category><![CDATA[fastapi-guide]]></category>
            <category><![CDATA[fastapi-tutorials]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Sun, 13 Jul 2025 08:49:25 GMT</pubDate>
            <atom:updated>2025-10-22T11:01:44.653Z</atom:updated>
            <content:encoded><![CDATA[<h4>I started learning Python a month ago to build a backend using Django and Django REST Framework (DRF). Yes, the one that proudly claims to be “<strong>the web framework for perfectionists with deadlines</strong>” on its website.</h4><p>Perhaps it’s because I’m not a perfectionist, or due to my limited experience with backend technologies, but it turned out to be a nightmare. Like it or not, Django doesn’t feel like it’s built for the world of 2025.</p><p>Then I stumbled on<strong> FastAPI</strong>, and it felt much easier and modern. In this article, I will share what I learned, of course, the basics — what else are you expecting from a guy who started backend a month before 🤔.</p><p>First and foremost, link to the official <a href="https://fastapi.tiangolo.com/">doc</a> of Fast API now, let&#39;s get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nnk9_v3M52HKOC4A" /><figcaption>Photo by <a href="https://unsplash.com/@hiteshchoudhary?utm_source=medium&amp;utm_medium=referral">Hitesh Choudhary</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Step -1 Create a virtual environment</h3><p>Even though not compulsory, it is always recommended to create a virtual environment. This prevents the versions of packages you install for one project from interfering with your future projects.</p><p>Create a folder and run the command (for Windows users)</p><pre>python -m venv apple</pre><p>On Windows above command creates a virtual environment named <strong>apple </strong>inside your folder.</p><p>Then you should activate the virtual environment, run the below command from the command prompt you used to create the virtual environment, apple.</p><pre>apple\Scripts\activate</pre><p>Once you have activated the virtual environment, you should see something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*cQ8GkWh8OdusiuvWlMUciA.png" /></figure><p>If yes, you are inside a virtual environment, and you can start installing packages.</p><h4>Install Fast API</h4><pre>pip install &quot;fastapi[standard]&quot;</pre><p>This command installs Fast API, uvicorn, and other necessary packages.</p><h3><strong>Step-2 Creating APIs</strong></h3><p>Move inside the “<strong><em>apple ”</em></strong>folder and open it in VS Code or any other IDE.</p><p>=&gt; Create a main.py file, and we will write a few lines of Python code</p><pre>from fastapi import FastAPI<br><br>app = FastAPI()<br><br>@app.get(&quot;/&quot;)<br>def firstApi():<br>    return {&quot;Hello&quot;: &quot;World&quot;}</pre><p>That&#39;s it, when someone visits the route “/”, the following function definition is executed. The above example depicts how a GET request is handled.</p><blockquote>You can return a Python dict. It will be converted to <br>JSON by Fast API.</blockquote><h4>How to run the Application?</h4><p>You should be inside the “<strong><em>apple </em>”</strong>folder and run the command</p><pre>fastapi dev</pre><h4>Now let’s see how a POST request is handled.</h4><p>To understand handling post requests in Fast API, we should know about <strong>Pydantic</strong>. <strong>Pydantic</strong> is a Python library that helps you define <strong>data models</strong> using Python classes.</p><p>Pydantic helps in validating the incoming request body. It is Fast API’s way of saying I am expecting these things in the request body, and these things should be of the declared type.</p><pre>from pydantic import BaseModel<br><br>class toDoModel(BaseModel):<br>    title:str<br>    details:str<br>    is_Completed:bool</pre><p>This is an example of a model class.</p><blockquote>We will see how Fast API uses this model class to validate the body of the request. We will also explore this when we discuss the API doc generation feature in Fast API .</blockquote><pre>from fastapi import FastAPI<br>from pydantic import BaseModel<br><br>app = FastAPI()<br><br>class toDoModel(BaseModel):<br>    title:str<br>    details:str<br>    is_Completed:bool<br><br><br>@app.post(&quot;/todo&quot;)<br>def create_todo(todo: toDoModel):<br>    return {&quot;todo&quot;: todo}</pre><p>The above example shows how a post request is handled in FastAPI.</p><p>Here, Fast API expects the body to be like ⬇️</p><pre>{<br>  &quot;title&quot;: &quot;string&quot;,<br>  &quot;details&quot;: &quot;string&quot;,<br>  &quot;is_Completed&quot;: true<br>}</pre><p>If the client doesn’t adhere to this structure, FastAPI will throw an error. We will see this when we discuss the Doc generation feature.</p><p><strong>What happens when a post request is made</strong> ?</p><p>Fast Api receives the JSON data from the client, and the data is converted to a <strong>Pydantic object</strong>.</p><p>It is very important to know this because when you are saving the data to a DB like say MongoDB, you can’t directly pass “<strong>todo ”</strong>that you received in the <strong>create_todo </strong>function. It should be converted to a Python dict or some other acceptable structure.</p><p>Similarly, you can work with PUT, DELETE ...</p><h3>Step 3: Documenting the APIs</h3><p>FastAPI auto-generates interactive API documentation out of the box using the <strong>OpenAPI standard</strong>. You get this just by defining your routes and Pydantic models.</p><h4>How to access the docs?</h4><p>Say your app is listening to <a href="http://localhost:8000/"><strong>http://localhost:8000/</strong></a><strong> <br></strong>Just add “docs” at the end.<br>eg- <strong><em>http://localhost:8000/docs</em></strong></p><h4>Let’s see the auto-generated docs of our POST API “/todo”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pe8qRwDf1m0aDD3k8s-VBw.png" /><figcaption>Fast API doc</figcaption></figure><p>The <strong>Request body</strong> section explains how the response body should be structured, and the <strong>Response </strong>section shows the expected output.</p><p>This API Documentation is interactive; you can test the APIs by clicking the <strong>Try it out </strong>button at the top right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3rdKjI-KB_2cQ1hYZhzOLw.png" /><figcaption>Testing Docs</figcaption></figure><p>Once the button is clicked the the request body becomes editable. You can edit the payload and see the response.</p><p>You can also see how Fast API handles errors by altering the payload.</p><p>FastAPI comes with many more features built in will discuss in upcoming blogs as I learn more. I hope this was worth your time. Always open to suggestions and improvements.</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b80111d09955" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/getting-started-with-fastapi-in-2025-a-beginners-guide-b80111d09955">Getting Started with FastAPI in 2025: A Beginner’s Guide</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I learned about JavaScript promises]]></title>
            <link>https://javascript.plainenglish.io/what-i-learned-about-javascript-promises-a41b9bda60c1?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a41b9bda60c1</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[promises-in-javascript]]></category>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[learn-in-public]]></category>
            <category><![CDATA[documenting]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Sun, 26 Jan 2025 07:52:40 GMT</pubDate>
            <atom:updated>2025-10-22T09:49:35.343Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I am documenting what I learned about Promises in Javascript. As always, you are welcome to correct me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AixtVVeuItk5F_GO" /><figcaption>Photo by <a href="https://unsplash.com/@writecodenow?utm_source=medium&amp;utm_medium=referral">Boitumelo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I will explain the concept in terms of a web application. In a web application, we might need to do things that immediately don’t return a value, like fetching an API response, reading files, etc.</p><p>JavaScript is <strong>single-threaded</strong> by design, which means a main thread executes the code. Blocking the main thread can freeze the whole application. In such scenarios, <strong>Asynchronous programming </strong>comes into play.</p><blockquote>If JavaScript is a single thread, how can it perform <strong>Asynchronous </strong>tasks?</blockquote><blockquote>JavaScript relies on background systems (depending on the environment) to handle these operations. In our case, JavaScript uses <strong>Web APIs</strong> provided by the browser to do operations like fetching APIs and handling DOM events.</blockquote><p>This is all good, right? Then why do we need promises?</p><p>There are situations in which the output of one function is used by another function.</p><p>for example =&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVhOt9jFxSbIUhRRcSBDLA.png" /></figure><p>In this scenario function <strong>f2()</strong> uses the value of variable ‘a’ which is assigned by function <strong>f1()</strong></p><p>In this scenario, we will get <strong>undefined</strong> if we try to use ‘a’ in function <strong>f2()<br></strong>because the value of ‘a’ is not yet prepared by function <strong>f1().</strong></p><h3>Using callbacks to solve the problem …</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r05OsjXikIDl7c1VvsJ2WA.png" /><figcaption>Example with callback.</figcaption></figure><p>When using callback we are passing function <strong>f2() </strong>as input for function <strong>f1(),<br></strong>once <strong>f1() </strong>completes the execution <strong>f2() </strong>is called, and ‘a’ is passed as an argument.</p><p>The issue with this approach is that, imagine we have a 3rd function <strong>f3()</strong> which consumes value from <strong>f2()</strong>; we have to pass <strong>f3()</strong> as an argument to <strong>f2().</strong></p><blockquote>As the number of function that depends on each other’s output increases ,<br>it creates a callback hell. This makes our code difficult to read and maintain.</blockquote><h3><strong>Using Promises</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CnvhWQdtS3AOmHg82DL-Vw.png" /><figcaption>Example with promise.</figcaption></figure><p>In this approach, <strong>f1() </strong>returns a promise, and we create a promise using a promise constructor.</p><p>The constructor takes in a function as an argument this function is called an <strong>executor function, </strong>this function takes 2 arguments <strong>resolve, reject</strong></p><p><strong>resolve </strong>is called when the promise is resolved (<strong>fulfilled</strong>), and <strong>reject </strong>is called when the promise is rejected or errors out.</p><p>In our scenario <strong>f1() </strong>returns a promise and the resolved value is consumed by <strong>f2()</strong>.</p><pre>f1().then(f2);</pre><p>This syntax should be read as when the promise inside f1() is resolved then the resolved value is passed to <strong>f2()</strong>, we can attach an error handler by attaching <strong>.catch() </strong>to the<strong> then().</strong></p><pre>f1().then(f2).catch(<br>    ()=&gt;{<br>        console.log(&#39;error&#39;)<br>    });</pre><p>In case instead of <strong>resolve()</strong> if <strong>reject() </strong>is called usually when an error occurs <strong>catch() is </strong>executed</p><p>If function <strong>f2() </strong>also<strong> </strong>returns a promise and if there is an <strong>f3()</strong> that consumes the output of <strong>f2() </strong>we can chain the promises.</p><pre>f1()<br>    .then(f2)<br>    .then(f3)<br>    .catch(<br>    ()=&gt;{<br>        console.log(&#39;error&#39;)<br>    });</pre><p>We’ve only touched the tip of the iceberg when it comes to promises in JavaScript, but these are the fundamental concepts you need to get started.</p><p>Promises are an advanced topic in JavaScript, so if you’re still wrapping your head around them, that’s perfectly fine — keep learning, reading, and watching tutorials to deepen your understanding.</p><p>credits<br><a href="https://youtu.be/TnhCX0KkPqs?feature=shared">JavaScript Promises — Tutorial for Beginner</a></p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a41b9bda60c1" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/what-i-learned-about-javascript-promises-a41b9bda60c1">What I learned about JavaScript promises</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I started a Youtube channel in 2014]]></title>
            <link>https://medium.com/@anandhu_as/why-i-started-a-youtube-channel-in-2014-82a97dd7b706?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/82a97dd7b706</guid>
            <category><![CDATA[youtuber-success-story]]></category>
            <category><![CDATA[why-youtube]]></category>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[why-i-sharted-youtube]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 14:15:12 GMT</pubDate>
            <atom:updated>2025-01-11T14:15:12.498Z</atom:updated>
            <content:encoded><![CDATA[<h4>Not a guide on how to run a YouTube channel</h4><p>I was in 9th standard at the time. My school conducts Lingua Fest every alternate year, and during the fest, our seniors present a short film they created at the school theater.</p><p>Only a lucky few children got a chance to watch the film unfortunately, I was not one among them.</p><p><strong><em>“The short film was uploaded on YouTube” </em></strong>the news spread like wildfire! It was 2014, and most of us didn’t even have the<strong><em> </em></strong>internet.</p><p>Even though I knew about YouTube and people making money from it I never thought of uploading a video, but this incident made me think.</p><blockquote>If they can do it, why can’t I?</blockquote><p>My YouTube channel was born, I called it <strong><em>VABAHK TV</em></strong></p><p><strong>VABAHK</strong> was my school gang. I still don’t know why I stuck a “TV” at the end of a YouTube channel — maybe I got inspired by television channels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ormL9ex-5W2CH5v8" /><figcaption>Photo by <a href="https://unsplash.com/@eyestetix?utm_source=medium&amp;utm_medium=referral">Eyestetix Studio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>My first video</h3><p>My first video was me spinning a basketball, and my first camera was a Nokia Asha 200. Don’t you dare judge my video quality. <br>It was 2014,<br>150 MB data cost RS 29 <br>1GB costs around RS 201</p><blockquote>It was harder to upload the video than to make it.</blockquote><p>Only a few of my friends use Facebook and sharing the video wasn’t a thing, It was all fun who cared about views anyway?</p><h3>Making money</h3><p>Back then, internet penetration was only a fraction of what it is today. <br>YouTube wanted more creators on the platform so, there were no strict rules for monetization( Except for copyright and a few other things)</p><p>I applied for monetization and I got an email from YouTube</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*CTOPJvOHSO3b8XYrW7_yGw.png" /></figure><p>yep, my channel got monetized &amp; I even made about $2 from it, I couldn’t withdraw it as I never met the threshold for payout.</p><blockquote>Even though I never got the money it was my first salary .</blockquote><h3>My first Copyright strike</h3><p>Once I was making a video about my used Recharge coupon collection</p><blockquote>For newbies, we recharged our phone with a coupon</blockquote><p>I just shot the video with my Asha 200 transferred it to the desktop and uploaded it and I got an email from YouTube</p><blockquote><strong>I got a copyright claim from eastcoastvijayan for using his song Poomazhayathu Mazhaythu</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYj36Nm1NrCixLQafmnxQA.png" /></figure><blockquote>what! I haven&#39;t even heard of this song. After some close inspection, I found that <br><strong>I had inadvertently infringed on his copyright.</strong></blockquote><p>I was recording the video in the living room with the TV on and my beloved camera picked it up.<br> since my videos didn’t have any audio, I never cared to cross-check or I just didn’t know what copyright was back then.</p><h3>Conclusion</h3><p>These are a few of my experiences being a first-time youtuber</p><p>Even though I haven&#39;t had much success on YouTube, I don’t regret any of it<br>As Robert A. Heinlein famously wrote ‘Specialization is for insects ’, we should keep doing things simply for the joy of doing them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82a97dd7b706" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My experience using Flipkart Pay later]]></title>
            <link>https://medium.com/@anandhu_as/my-experience-using-flipkart-pay-later-004465c87af2?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/004465c87af2</guid>
            <category><![CDATA[flipkart-pay-later]]></category>
            <category><![CDATA[flipkart-big-billion-day]]></category>
            <category><![CDATA[financial-planning]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Sat, 04 Jan 2025 04:57:01 GMT</pubDate>
            <atom:updated>2025-01-04T04:57:01.191Z</atom:updated>
            <content:encoded><![CDATA[<p>The first thing I did after getting my PAN card was sign up for Flipkart Pay later, it is much easier than getting a credit card.</p><p>I got Rs 30,000 as the initial credit limit, I didn’t want anything in particular but my Monkey mind tried to spend it all on something (it felt like free money).</p><p>Even though Flipkart allows you to combine payment options, the thing I wanted didn’t support that, for some weird reason, I couldn’t buy anything using my credit limit and bank balance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vOExu_n6D3RE0jd1" /><figcaption>Photo by <a href="https://unsplash.com/@dileeshg?utm_source=medium&amp;utm_medium=referral">Dileesh Kumar</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So I went back in time searching for the thing I needed. Out of nowhere, it suggested Galaxy Watch 4 at an astonishing discount (under 10K), a quick hit of dopamine I realized this was where I gonna spend the buck.</p><p>I started browsing YouTube for hours to justify my decision all my favorite tech YouTube said there was nothing more worthy of my money than the Galaxy Watch 4, but there was a catch being a 4-year-old smartwatch it had issues with the battery and didn’t support few features like Tap to pay at least in INDIA. Some suggested “<em>Why not go for Galaxy Watch 6&quot;</em></p><blockquote>Still under 30K, already invested into Samsung Eco-system I didn’t think twice I brought it for around 24K</blockquote><p>I don’t regret my decision,</p><p>but would I buy something that was 3 times more expensive than the thing I was looking for If I didn&#39;t have the credit option<br><strong>Absolutely No...</strong></p><p>I believe things like this are supposed to happen to help us realize more about our spending habits. As a 25-year-old having a brand-new credit card, I am much more careful about my spending (at least for now)that&#39;s a story for another day.</p><p>Thank you for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=004465c87af2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Prefer CDN Over npm for Newbies]]></title>
            <link>https://javascript.plainenglish.io/why-someone-should-prefer-cdn-over-npm-a70e20711a86?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a70e20711a86</guid>
            <category><![CDATA[cdn]]></category>
            <category><![CDATA[content-delivery-network]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Wed, 01 Jan 2025 18:28:39 GMT</pubDate>
            <atom:updated>2025-10-22T05:59:13.355Z</atom:updated>
            <content:encoded><![CDATA[<p>In web development, the choice of using CDN or NPM depends on many scenarios. But when starting with front-end development, I suggest using CDNs whenever possible.</p><p>CDNs such as <a href="https://cdnjs.com/"><em>cdnjs</em></a><strong> </strong>allow developers to use libraries by simply pasting links or scripts into the HTML files thereby eliminating the need for managing a a <strong><em>package.json.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9OOU0-5Sl1H1_2Pe" /><figcaption>Photo by <a href="https://unsplash.com/@jacksonsophat?utm_source=medium&amp;utm_medium=referral">Jackson Sophat</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When you are getting started with the front end you can focus more on learning the core skills like HTML, CSS, and JavaScript without worrying about installing or managing packages.</p><p>Here is a small example of how to use RxJS when working with a simple HTML, JS application.</p><p><strong>Step 1 </strong>=&gt; Add the below script to the HTML file</p><pre>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.0/rxjs.umd.min.js&quot;&gt;&lt;/script&gt;</pre><p><strong>Step 2 </strong>=&gt; In the JS file you can start using RxJS operators.</p><pre>const { of } = rxjs;<br>of(1, 2, 3).subscribe(console.log);</pre><p>Share your thoughts in the comments. Your input helps improve this blog — thank you!”</p><h3>A message from our Founder</h3><p><strong>Hey, </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>Sunil</strong></a><strong> here.</strong> I wanted to take a moment to thank you for reading until the end and for being a part of this community.</p><p>Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? <strong>We don’t receive any funding, we do this to support the community. ❤️</strong></p><p>If you want to show some love, please take a moment to <strong>follow me on </strong><a href="https://linkedin.com/in/sunilsandhu"><strong>LinkedIn</strong></a><strong>, </strong><a href="https://tiktok.com/@messyfounder"><strong>TikTok</strong></a>, <a href="https://instagram.com/sunilsandhu"><strong>Instagram</strong></a>. You can also subscribe to our <a href="https://newsletter.plainenglish.io/"><strong>weekly newsletter</strong></a>.</p><p>And before you go, don’t forget to <strong>clap</strong> and <strong>follow</strong> the writer️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a70e20711a86" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/why-someone-should-prefer-cdn-over-npm-a70e20711a86">Why I Prefer CDN Over npm for Newbies</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Experience with the Samsung Galaxy Watch 6]]></title>
            <link>https://medium.com/@anandhu_as/my-thoughts-on-the-samsung-watch-6-b286825ea44f?source=rss-3511e9adb6e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b286825ea44f</guid>
            <category><![CDATA[samsung]]></category>
            <category><![CDATA[smartwatch]]></category>
            <category><![CDATA[samsung-galaxy-watch6]]></category>
            <category><![CDATA[samsung-watch]]></category>
            <dc:creator><![CDATA[Anandhu AS]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 07:04:13 GMT</pubDate>
            <atom:updated>2024-09-28T07:11:42.148Z</atom:updated>
            <content:encoded><![CDATA[<p>These are my thoughts after using the Samsung Galaxy Watch 6 as my daily driver for almost 2 months.</p><p>When I say daily driver I mean it, it is an LTE variant that can replace my phone at times. It cost me around 22k(INR) on Flipkart, where you can get a good Midrange phone; why should someone go for it?</p><blockquote><strong><em>It helps you stay connected, yet it’s not as distracting as your phone.</em></strong></blockquote><p>You can use Samsung Pay to make payments, link your WhatsApp, Spotify, Audible, and Storytel for audio content, and even have a browser to access some of your favorite web apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g1OZrPxAGOcjOBiH" /><figcaption>Photo by <a href="https://unsplash.com/@kshithijchandrashekar?utm_source=medium&amp;utm_medium=referral">Kshithij Chandrashekar</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Being a wear OS device with inbuilt GPS support you can use Google Maps independently, to reduce battery usage you can stream maps directly from your phone to watch, this is one of my favorite features, <em>no more checking your phone while riding!</em></p><p>Pedometers, auto-workout detection, and sleep monitoring are extremely accurate.</p><p>One thing to mention is the display it is just awesome even when used under direct sunlight, protected by a sapphire crystal which keeps it safe always.</p><p>When it comes to the battery it can last around 36 hrs on a single charge with the network(you can receive and make calls) turned on and LTE turned off. I use it to make calls, listen to music, and record workouts, and the battery never disappoints me.</p><p>A Samsung phone is essential for fully utilizing features like Samsung Pay, but aside from that, it’s also the top Wear OS device you can get for any Android phone. During sales on Flipkart, you can grab it for under 20K with bank offers, making it an excellent deal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b286825ea44f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>