Coder Social home page Coder Social logo

ai-azure-cosmos-db-azure-blob-storage's Introduction

AI-Azure-Cosmos-DB-Azure-Blob-Storage

AI Python Apps for Azure Cosmos DB, Azure Blob Storage, Azure Container Registry, and Azure Container Apps

Prep Work:

  1. Create an azure subscription, azure resource group, azure cosmos db, azure blob storage account.
  2. Download Azure Storage Explorer and Azurite for ABS.
  3. Download document db quick start.

Video Playlist:

https://www.youtube.com/playlist?list=PLHgX2IExbFos07Jf1iT2gg94A2IArbmLC

Github Repo:

https://github.com/AaronCWacker/AI-Azure-Cosmos-DB-Azure-Blob-Storage

Startup

  1. Download and inspect the Python Quick start app for Azure Cosmos DB: image

Azure Cosmos DB (ACDB) Data Explorer

  1. Inspect Data Explorer. Which Features Do you See? image
  2. New Container
  3. New Database
  4. New SQL Query
  5. Open Query
  6. New Stored Procedure
  7. New Item
  8. Upload Item

Azure Blob Storage (ABS) Storage Explorer

  1. Inspect Storage Explorer. Enumerate Features. image
  2. Storage Accounts
  3. Blob Containers
  4. File Shares
  5. Queues
  6. Tables
  7. Emulator (Download Azurite for local ABS Development

Prompts for Basic Streamlit UI Development Using Python and AI

Create a streamlit python app that uses Azure Cosmos DB (ACDB) and Azure Blob Storage (ABS) to connect to Azure and run queries and save and download file resources and data. The UI should include the following sidebar buttons adding appropriate emojis. Create two expanders with emojis on labels one to contain the ACDB UI Elements and one for the ABS UI Elements. For ACDB use this list of ffeatures to each create a button for: 1. New Container 2. New Database 3. New SQL Query 4. Open Query 5. New Stored Procedure 6. New Item 7. Upload Item For ABS use this list of features to each create a button for: 1. Storage Accounts 2. Blob Containers 3. File Shares 4. Queues 5. Tables 6. Emulator (Download Azurite for local ABS Development import the required python libraries for both Azure Cosmos DB and Azure Blob Storage. Add basic UI to Supply a Connection String and Primary Key for ABS. Do the Same to create basic UI connectivity to Azure Cosmos DB. For both of those create the UI elements in center area with streamlit wide and keep the two expanders open by default on streamlit sidebar.

Basic UI AI Generated Code (Enter and Test)

import streamlit as st
# Import Azure libraries (placeholder, you will need to replace with actual libraries)
# from azure.storage.blob import BlobServiceClient
# from azure.cosmos import CosmosClient

# Function to create ACDB buttons
def create_acdb_buttons():
    st.button("๐Ÿ—ƒ๏ธ New Container")
    st.button("๐Ÿ’พ New Database")
    st.button("๐Ÿ” New SQL Query")
    st.button("๐Ÿ“‚ Open Query")
    st.button("๐Ÿ“œ New Stored Procedure")
    st.button("โž• New Item")
    st.button("โฌ†๏ธ Upload Item")

# Function to create ABS buttons
def create_abs_buttons():
    st.button("๐Ÿ“ฆ Storage Accounts")
    st.button("๐Ÿ—‚๏ธ Blob Containers")
    st.button("๐Ÿ“ File Shares")
    st.button("๐Ÿ”— Queues")
    st.button("๐Ÿ“‹ Tables")
    st.button("๐Ÿงช Emulator (Download Azurite)")

# UI for Azure Blob Storage connectivity
def abs_connectivity_ui():
    st.text_input("ABS Connection String", "Enter your connection string here")
    st.text_input("ABS Primary Key", "Enter your primary key here")

# UI for Azure Cosmos DB connectivity
def acdb_connectivity_ui():
    st.text_input("ACDB Connection String", "Enter your connection string here")
    st.text_input("ACDB Primary Key", "Enter your primary key here")

# Main app layout
def main():
    st.sidebar.title("Azure Integration App")

    # ACDB Expander
    with st.sidebar.expander("Azure Cosmos DB ๐ŸŒ", expanded=True):
        create_acdb_buttons()

    # ABS Expander
    with st.sidebar.expander("Azure Blob Storage ๐Ÿ—„๏ธ", expanded=True):
        create_abs_buttons()

    # Main area for ABS and ACDB connectivity
    st.title("Azure Connectivity")
    with st.container():
        st.header("Azure Blob Storage Connectivity")
        abs_connectivity_ui()
        
        st.header("Azure Cosmos DB Connectivity")
        acdb_connectivity_ui()

if __name__ == "__main__":
    main()

ai-azure-cosmos-db-azure-blob-storage's People

Contributors

aaroncwacker avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.