Skip to content

chidananda-dev/Interview-Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure VNet API with Python

Features

  • Create VNet with multiple subnets in Azure
  • Store and retrieve metadata
  • JWT authentication

Setup

  1. Clone the repo
  2. Install requirements:
    pip install -r requirements.txt
  3. Fill in the .env file with your Azure credentials

Run the App

uvicorn app.main:app --reload

Generate JWT Token

python scripts/generate_token.py

Use the output token as:

Authorization: Bearer <token>

Sample Request

POST /vnet

{
  "name": "finance-vnet",
  "location": "eastus",
  "resource_group": "rg-finance",
  "address_space": ["10.10.0.0/16"],
  "subnets": [
    {"name": "subnet-db", "address_prefix": "10.10.1.0/24"},
    {"name": "subnet-app", "address_prefix": "10.10.2.0/24"}
  ]
}

GET /vnets

Lists stored VNets from the local DB.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages