{"id":121459,"date":"2026-07-08T19:24:44","date_gmt":"2026-07-08T13:54:44","guid":{"rendered":"https:\/\/www.guvi.in\/blog\/?p=121459"},"modified":"2026-07-08T19:24:45","modified_gmt":"2026-07-08T13:54:45","slug":"build-rest-api-with-fastapi-sqlalchemy","status":"publish","type":"post","link":"https:\/\/www.guvi.in\/blog\/build-rest-api-with-fastapi-sqlalchemy\/","title":{"rendered":"Building a REST API with FastAPI + SQLAlchemy + Alembic"},"content":{"rendered":"\n<p>FastAPI has become Python&#8217;s fastest-growing web framework, surpassing Flask in GitHub stars in late 2025 and now powering production APIs at companies like Microsoft, Netflix, and Uber. Pair it with SQLAlchemy 2.0 for database access and Alembic for schema migrations, and you have a production-grade stack that is both fast to build and built to last. This guide walks you through the complete setup from scratch.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>TL;DR\u00a0Summary<\/strong><\/h2>\n\n\n\n<ul>\n<li>Use FastAPI (Pydantic\/Starlette) for routing\/validation, SQLAlchemy 2.0 (Mapped\/mapped_column) for models\/queries, and Alembic for version-controlled migrations this stack is production-ready and testable.<\/li>\n\n\n\n<li>Follow a clean project layout: models, schemas, routers, and services separated; keep routes thin, put business logic in services, and use get_db() dependency for per-request sessions with pool_pre_ping=True.<\/li>\n\n\n\n<li>Avoid pitfalls: never use Base.metadata.create_all() in production, always return Pydantic response_model (not raw ORM), import all models in Alembic env.py, use .env for DATABASE_URL, and prefer async (asyncpg + sqlalchemy[asyncio]) for production.<\/li>\n<\/ul>\n\n\n\n<p><em>Build production APIs with FastAPI + SQLAlchemy + Alembic. Master Python backend with HCL GUVI\u2019s <\/em><strong><em>Python Zero to Hero course.<\/em><\/strong><em> <\/em><a href=\"https:\/\/www.guvi.in\/courses\/programming\/python-zero-to-hero\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Start your Python journey here<\/em><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What Are FastAPI, SQLAlchemy, and Alembic?<\/strong><\/h2>\n\n\n\n<p>FastAPI is a modern Python web framework built on Pydantic and Starlette. SQLAlchemy 2.0 is the industry-standard Python ORM for defining and querying relational databases. Alembic is SQLAlchemy&#8217;s companion migration tool. It tracks schema changes over time so you never modify a production database by hand. Together, these three cover your entire API-to-database layer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 1:&nbsp; Install Dependencies<\/strong><\/h2>\n\n\n\n<ul>\n<li>pip install &#8220;fastapi[standard]&#8221; sqlalchemy alembic psycopg2-binary python-dotenv uvicorn<\/li>\n\n\n\n<li>FastAPI [standard] includes Pydantic v2 and uvicorn. psycopg2-binary is the PostgreSQL driver. python-dotenv loads environment variables from a .env file so your database URL never lives in code.<\/li>\n\n\n\n<li>For async support, strongly recommended for production, replace psycopg2-binary with asyncpg and add sqlalchemy[asyncio]:<\/li>\n\n\n\n<li>pip install asyncpg &#8220;sqlalchemy[asyncio]&#8221;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 2: Configure the Database Connection<\/strong><\/h2>\n\n\n\n<ul>\n<li>Create app\/database.py. This file sets up the SQLAlchemy engine, the session factory, and the declarative base all your models will inherit from:<\/li>\n\n\n\n<li>from sqlalchemy import create_engine from sqlalchemy. orm import sessionmaker, DeclarativeBase from app.config import settings<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>engine = create_engine(settings.DATABASE_URL, pool_pre_ping=<\/strong><strong>True<\/strong><strong>, <\/strong><strong># Reconnects on stale connections echo=False # Set True for SQL query logging in dev )<\/strong><strong><br><\/strong><strong>SessionLocal = sessionmaker(autocommit=<\/strong><strong>False<\/strong><strong>, autoflush=<\/strong><strong>False<\/strong><strong>, bind=engine)<\/strong><strong><br><\/strong><strong>class<\/strong><strong> <\/strong><strong>Base<\/strong><strong>(<\/strong><strong>DeclarativeBase<\/strong><strong>): <\/strong><strong>pass<\/strong><strong><br><\/strong><strong>def<\/strong><strong> <\/strong><strong>get_db<\/strong><strong>(): <\/strong><strong>db<\/strong><strong> = <\/strong><strong>SessionLocal<\/strong><strong>() <\/strong><strong>try<\/strong><strong>: <\/strong><strong>yield<\/strong><strong> <\/strong><strong>db<\/strong><strong> <\/strong><strong>finally<\/strong><strong>: <\/strong><strong>db<\/strong><strong>.<\/strong><strong>close<\/strong><strong>()<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul>\n<li>pool_pre_ping=True handles database connection drops gracefully, critical in any containerized or cloud environment. get_db() is a FastAPI dependency that opens a session per request and closes it cleanly regardless of success or failure.<\/li>\n\n\n\n<li>Create app\/config.py to load the database URL from your .env file:<\/li>\n\n\n\n<li>from pydantic_settings import BaseSettings<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>class Settings(BaseSettings): DATABASE_URL: str = &#8220;postgresql:\/\/user:password@localhost\/mydb&#8221;<\/strong><br>class Config:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;env_file = &#8220;.env&#8221;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>settings = Settings()<\/strong><\/p>\n\n\n\n<div style=\"background-color: #099f4e; border: 3px solid #110053; border-radius: 12px; padding: 18px 22px; color: #FFFFFF; font-size: 18px; font-family: Montserrat, Helvetica, sans-serif; line-height: 1.6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); max-width: 750px;\">\n\n  <strong style=\"font-size: 22px; color: #FFFFFF;\">\ud83d\udca1 Did You Know?<\/strong>\n  <br \/><br \/>\n\n  <strong style=\"color: #FFFFFF;\">Pydantic&#8217;s<\/strong> <strong style=\"color: #FFFFFF;\">model_config = {&#8220;from_attributes&#8221;: True}<\/strong> (previously <strong style=\"color: #FFFFFF;\">orm_mode = True<\/strong> in Pydantic v1) enables models to read data directly from <strong style=\"color: #FFFFFF;\">SQLAlchemy ORM objects<\/strong>. Without this setting, <strong style=\"color: #FFFFFF;\">FastAPI<\/strong> cannot automatically access ORM model attributes when generating JSON responses. Enabling it allows FastAPI to seamlessly serialize database objects into API responses without requiring manual conversion to dictionaries.\n\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 3: Define Your SQLAlchemy Model<\/strong><\/h2>\n\n\n\n<p>Create app\/models\/user. py:<\/p>\n\n\n\n<p>from sqlalchemy import Integer, String, DateTime, func from sqlalchemy. orm import Mapped, mapped_column from app.database import Base<\/p>\n\n\n\n<p>class User(Base): <strong>tablename<\/strong> = &#8220;users&#8221;<\/p>\n\n\n\n<p>id: Mapped[int] = mapped_column(Integer, primary_key=True, index=True)<\/p>\n\n\n\n<p>email: Mapped[str] = mapped_column(String, unique=True, index=True, nullable=False)<\/p>\n\n\n\n<p>name: Mapped[str] = mapped_column(String, nullable=False)<\/p>\n\n\n\n<p>created_at: Mapped[DateTime] = mapped_column(DateTime, server_default=func.now())<\/p>\n\n\n\n<p>This uses SQLAlchemy 2.0&#8217;s Mapped and mapped_column syntax, the modern approach that provides full type inference. The older Column() style still works, but doesn&#8217;t give you the same static analysis support.<\/p>\n\n\n\n<p>server_default=func.now() sets the timestamp at the database level, not in <a href=\"https:\/\/www.guvi.in\/blog\/beginner-roadmap-for-python-basics-to-web-frameworks\/\" target=\"_blank\" rel=\"noreferrer noopener\">Python<\/a>, which is important for consistency across multiple API workers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 4: Create Pydantic Schemas<\/strong><\/h2>\n\n\n\n<p>Schemas define what comes in from the client and what goes out in the response. They live in app\/schemas\/user.py and are completely separate from your SQLAlchemy models:<\/p>\n\n\n\n<p>from pydantic import BaseModel, EmailStr from datetime import datetime<\/p>\n\n\n\n<p>class UserCreate(BaseModel): email: EmailStr name: str<\/p>\n\n\n\n<p>class UserResponse(BaseModel): id: int email: str name: str created_at: datetime<\/p>\n\n\n\n<p>model_config = {&#8220;from_attributes&#8221;: True}<\/p>\n\n\n\n<ul>\n<li>model_config = {&#8220;from_attributes&#8221;: True} (formerly orm_mode = True in Pydantic v1) tells Pydantic how to read values from SQLAlchemy model attributes rather than a plain dictionary. Without this, FastAPI cannot serialise ORM objects into <a href=\"https:\/\/www.guvi.in\/blog\/complete-guide-on-how-to-open-a-json-file\/\" target=\"_blank\" rel=\"noreferrer noopener\">JSON <\/a>responses.<\/li>\n\n\n\n<li>Never return SQLAlchemy model objects directly from your routes. Always pass through a Pydantic response schema. This prevents lazy-loaded relationships from triggering unexpected database queries during serialisation \u2014 one of the most common N+1 pitfalls in FastAPI applications.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 5: Build the Service Layer<\/strong><\/h2>\n\n\n\n<p>Business logic belongs in a service layer, not inside route handlers. Create app\/services\/user. py:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>from sqlalchemy.orm import Session from app.models.user import User from app.schemas.user import UserCreate<br>def get_user(db: Session, user_id: int) -&gt; User | None: <strong>return<\/strong> db.query(User).filter(User.id == user_id).first()<br>def get_users(db: Session, skip: int = 0, limit: int = 100) -&gt; <strong>list<\/strong>[User]: <strong>return<\/strong> db.query(User).offset(skip).limit(limit).all()<br>def create_user(db: Session, user_in: UserCreate) -&gt; User: user = User(email=user_in.email, name=user_in.name) db.add(user) db.commit() db.refresh(user) <strong>return<\/strong> user<br>def delete_user(db: Session, user_id: int) -&gt; bool: user = db.query(User).filter(User.id == user_id).first() <strong>if<\/strong> not user: <strong>return<\/strong> <strong>False<\/strong> db.delete(user) db.commit() <strong>return<\/strong> <strong>True<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Keeping database logic here means your routes become thin coordinators that validate input, call the service, and return the response. This makes each layer independently testable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 6: Create the API Routes<\/strong><\/h2>\n\n\n\n<p>Create app\/routers\/users.py:<\/p>\n\n\n\n<ul>\n<li>from fastapi import APIRouter, Depends, <a href=\"https:\/\/www.guvi.in\/blog\/http-in-computer-networks\/\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP<\/a>Exception, status from sqlalchemy. orm import Session from app. database import get_db from app.schemas.user import UserCreate, UserResponse from app. services import user as user_service<\/li>\n\n\n\n<li>router = APIRouter(prefix=&#8221;\/users&#8221;, tags=[&#8220;users&#8221;])<\/li>\n\n\n\n<li>@router.get(&#8220;\/&#8221;, response_model=list[UserResponse]) def list_users(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)): return user_service.get_users(db, skip=skip, limit=limit)<\/li>\n\n\n\n<li>@router.get(&#8220;\/{user_id}&#8221;, response_model=UserResponse) def get_user(user_id: int, db: Session = Depends(get_db)): user = user_service.get_user(db, user_id) if not user: raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=&#8221;User not found&#8221;) return user<\/li>\n\n\n\n<li>@router.post(&#8220;\/&#8221;, response_model=UserResponse, status_code=status. HTTP_201_ CREATED) def create_user(user_in: UserCreate, db: Session = Depends(get_db)): return user_service.create_user(db, user_in)<\/li>\n\n\n\n<li>@router.delete(&#8220;\/{user_id}&#8221;, status_code=status.HTTP_204_NO_CONTENT) def delete_user(user_id: int, db: Session = Depends(get_db)): if not user_service.delete_user(db, user_id): raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=&#8221;User not found&#8221;)<\/li>\n\n\n\n<li>Depends(get_db) injects a fresh database session into each route. FastAPI handles the dependency lifecycle automatically; the session opens at the start of the request and closes at the end via the finally block in get_db().<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 7:&nbsp; Wire Up main.py<\/strong><\/h2>\n\n\n\n<p>Create app\/main.py:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>from fastapi import FastAPI from app. routers import users<\/strong><strong><br><\/strong><strong>app = FastAPI(title=<\/strong><strong>&#8220;My API&#8221;<\/strong><strong>, version=<\/strong><strong>&#8220;1.0.0&#8221;<\/strong><strong>) app.include_router(users.router)<\/strong><strong><br><\/strong><strong>@app.get(<\/strong><strong>&#8220;\/health&#8221;<\/strong><strong>) def health_check(): <\/strong><strong>return<\/strong><strong> {<\/strong><strong>&#8220;status&#8221;<\/strong><strong>: <\/strong><strong>&#8220;ok&#8221;<\/strong><strong>}<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul>\n<li>Never call Base.metadata.create_all(engine) here in production. That approach creates tables from scratch but cannot handle schema changes.&nbsp;<\/li>\n\n\n\n<li>Add a column to your model, restart the app, and that column will not appear in the database. Always use Alembic migrations for any schema changes in staging and production.<\/li>\n<\/ul>\n\n\n\n<p><em>Build production APIs with FastAPI + SQLAlchemy + Alembic. Master Python backend with HCL GUVI\u2019s <\/em><strong><em>Python Zero to Hero course.<\/em><\/strong><em> <\/em><a href=\"https:\/\/www.guvi.in\/courses\/programming\/python-zero-to-hero\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Start your Python journey here<\/em><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 8: Set Up Alembic Migrations<\/strong><\/h2>\n\n\n\n<ul>\n<li>Alembic is what gives your database schema version control. Every change to a model \u2014 adding a column, creating an index, renaming a table \u2014 goes through a migration script, just like Git tracks code changes.<\/li>\n\n\n\n<li>Initialize Alembic:<\/li>\n\n\n\n<li>alembic init alembic<\/li>\n\n\n\n<li>Open alembic\/env.py and make two changes. First, load your database URL from config rather than hardcoding it:<\/li>\n\n\n\n<li>from app.config import settings config.set_main_option(&#8220;sqlalchemy.url&#8221;, settings.DATABASE_URL)<\/li>\n\n\n\n<li>Second, point Alembic at your model metadata so it can detect schema changes:<\/li>\n\n\n\n<li>from app.database import Base from app.models import user # Import all models so Base.metadata knows about them target_metadata = Base.metadata<\/li>\n\n\n\n<li>Now generate your first migration:<\/li>\n\n\n\n<li>alembic revision &#8211;autogenerate -m &#8220;Create users table&#8221;<\/li>\n\n\n\n<li>The &#8211;autogenerate flag compares your SQLAlchemy models against the current database schema and writes the migration steps automatically. Review the generated file in alembic\/versions\/ before applying autogenerate is smart but occasionally misses constraints or custom types.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Apply the migration:<\/strong><strong><br><\/strong><strong>alembic upgrade head<\/strong><strong><br><\/strong><strong>To roll back:<\/strong><strong><br><\/strong><strong>alembic downgrade -1<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Every schema change from this point follows the same pattern: update the model, generate a migration, review it, apply it. Never modify a production database manually outside this process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Running the API<\/strong><\/h2>\n\n\n\n<ul>\n<li>Development:<\/li>\n\n\n\n<li>uvicorn app.main:app &#8211;reload &#8211;host 0.0.0.0 &#8211;port 8000<\/li>\n\n\n\n<li>Production (multiple workers):<\/li>\n\n\n\n<li>uvicorn app.main:app &#8211;host 0.0.0.0 &#8211;port 8000 &#8211;workers 4<\/li>\n\n\n\n<li>FastAPI generates interactive <a href=\"https:\/\/www.guvi.in\/hub\/network-programming-with-python\/understanding-apis\/\" target=\"_blank\" rel=\"noreferrer noopener\">API <\/a>documentation automatically. Visit http:\/\/localhost:8000\/docs for the Swagger UI and http:\/\/localhost:8000\/redoc for the ReDoc interface\u00a0 both are live and executable against your running API.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>FastAPI, SQLAlchemy 2.0, and Alembic form a stack that is genuinely production-ready from the first line of code. FastAPI handles routing, validation, and serialisation through Pydantic. SQLAlchemy manages your database models and queries with full type inference.&nbsp;<\/p>\n\n\n\n<p>Alembic gives your schema the same version control discipline you apply to code. Keep your layers separated&nbsp; routes thin, logic in services, queries in models&nbsp; and every part of this stack becomes independently testable and easy to extend as your API grows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>&nbsp;FAQs&nbsp;<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1783393381855\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Why use Alembic over Base.metadata.create_all()?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Alembic tracks schema changes via migrations, enabling safe column\/index additions and rollbacks; create_all() can\u2019t handle schema evolution in existing tables.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783393386986\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>How do I set up async support in production?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Replace psycopg2-binary with asyncpg and install sqlalchemy[asyncio]; configure the engine with an async URL and use async session handling.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783393396268\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>What\u2019s the benefit of a service layer?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>It isolates business logic and DB queries from routes, making each layer independently testable and keeping routes thin as coordinators.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783393407090\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>How do I prevent N+1 queries during serialization?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Never return raw ORM objects; always use Pydantic response_model to avoid lazy-loaded relationships triggering unexpected queries.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783393417693\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>What\u2019s required in Alembic\u2019s env.py?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Load DATABASE_URL from config and import all models before setting target_metadata = Base.metadata so Alembic detects all tables.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783393426418\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>How do I generate and apply migrations?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Run alembic revision &#8211;autogenerate -m &#8220;message&#8221;, review the generated file, then apply with alembic upgrade head; roll back with alembic downgrade -1.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783393434933\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>How do I run the API in dev vs production?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Dev: uvicorn app.main:app &#8211;reload; Production: uvicorn app.main:app &#8211;workers 4; use FastAPI\u2019s auto-generated docs at \/docs (Swagger) and \/redoc.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>FastAPI has become Python&#8217;s fastest-growing web framework, surpassing Flask in GitHub stars in late 2025 and now powering production APIs at companies like Microsoft, Netflix, and Uber. Pair it with SQLAlchemy 2.0 for database access and Alembic for schema migrations, and you have a production-grade stack that is both fast to build and built to [&hellip;]<\/p>\n","protected":false},"author":63,"featured_media":122034,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[717],"tags":[],"views":"187","authorinfo":{"name":"Vishalini Devarajan","url":"https:\/\/www.guvi.in\/blog\/author\/vishalini\/"},"thumbnailURL":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/build-rest-api-with-fastapi-sqlalchemy-300x117.webp","_links":{"self":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/121459"}],"collection":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/comments?post=121459"}],"version-history":[{"count":2,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/121459\/revisions"}],"predecessor-version":[{"id":122029,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/121459\/revisions\/122029"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media\/122034"}],"wp:attachment":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media?parent=121459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/categories?post=121459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/tags?post=121459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}