SlideShare a Scribd company logo
1 of 22
AI Club
AI Club
Python with AI – I
Json and Requests
Modules in Python
• Use multiple functions written by others
Modules in Python
• Use multiple functions written by others
• Popular packages: json, requests
• How do you tell python to use these packages?
JSON Module
• JSON (JavaScript Object Notation)
• A very popular format to transmit and receive data over web
JSON Module
• JSON (JavaScript Object Notation)
• A very popular format to transmit and receive data over web
• How does it work in python?
• A json is a string
• JSON (JavaScript Object Notation)
• A very popular format to transmit and receive data over web
• What would the json dump of a dictionary be?
JSON Module
• JSON (JavaScript Object Notation)
• A very popular format to transmit and receive data over web
• How does it work in python?
• Can any type of variable be dumped? Strings? Lists?
JSON Module
• JSON (JavaScript Object Notation)
• A very popular format to transmit and receive data over web
• How does it work in python?
• Load a json variable
JSON Module
• This module helps you to send HTTP requests in python
• What are HTTP requests?
Requests Module in Python
• This module helps you to send HTTP requests in python
• How to use HTTP requests to interact with an AI?
Requests Module in Python
• This module helps you to send HTTP requests in python
• How to use HTTP requests to interact with an AI?
url: The http url to send request to
data: String containing the payload (features in case of AI)
Requests Module in Python
• This module helps you to send HTTP requests in python
• How to use HTTP requests to interact with an AI?
Example:
data: {“Sentence”: “I am sad”}
Requests Module in Python
• Login to your Navigator accounts and select the mood AI
Lets connect your AI with Python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
Lets connect your AI with Python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
Lets connect your AI with Python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
• Copy paste the code into your repl account
Lets connect your AI with Python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
• Copy paste the code into your repl account
Lets connect your AI with Python
• Copy paste the code into your repl account
• Note that the code is a function, you have to call this function to get
the prediction
json.dumps() converts
dictionary to striing
Convert the output you
receive into readable format
Lets connect your AI with Python
• Login to your Navigator accounts and select the mood AI
• Click on the integration tab in the monitor tab
• Select python from the drop down for connectors
• Copy paste the code into your repl account
• Upload the mood dataset into repl
Lets connect your AI with Python
• Build a python application powered by AI
• Examples
• Chatbot
• Games
• Tanks and bots
• Black jack
Think about your projects
THANK YOU
https://aiclub.world
info@pyxeda.ai

More Related Content

What's hot

How I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman SeninHow I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman SeninElixir Club
 
Better APIs with GraphQL
Better APIs with GraphQL Better APIs with GraphQL
Better APIs with GraphQL Josh Price
 
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Christophe Willemsen
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsSashko Stubailo
 
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksSoftware Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksPhill Sparks
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQLRodrigo Prates
 
Advanced API Debugging
Advanced API DebuggingAdvanced API Debugging
Advanced API DebuggingPostman
 
Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsTessa Mero
 
Raspberry using Python Session 3
Raspberry using Python Session 3Raspberry using Python Session 3
Raspberry using Python Session 3Mohamed Abd Ela'al
 
Introduction to graphQL
Introduction to graphQLIntroduction to graphQL
Introduction to graphQLMuhilvarnan V
 
Into to GraphQL
Into to GraphQLInto to GraphQL
Into to GraphQLshobot
 

What's hot (12)

How I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman SeninHow I did create Telegram bot - Roman Senin
How I did create Telegram bot - Roman Senin
 
Better APIs with GraphQL
Better APIs with GraphQL Better APIs with GraphQL
Better APIs with GraphQL
 
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
Chatbots and Voice Conversational Interfaces with Amazon Alexa, Neo4j and Gra...
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer tools
 
Elixir absinthe-basics
Elixir absinthe-basicsElixir absinthe-basics
Elixir absinthe-basics
 
Software Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill SparksSoftware Design Patterns in Laravel by Phill Sparks
Software Design Patterns in Laravel by Phill Sparks
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Advanced API Debugging
Advanced API DebuggingAdvanced API Debugging
Advanced API Debugging
 
Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIs
 
Raspberry using Python Session 3
Raspberry using Python Session 3Raspberry using Python Session 3
Raspberry using Python Session 3
 
Introduction to graphQL
Introduction to graphQLIntroduction to graphQL
Introduction to graphQL
 
Into to GraphQL
Into to GraphQLInto to GraphQL
Into to GraphQL
 

Similar to Pa1 json requests

Introduction to Python.pdf
Introduction to Python.pdfIntroduction to Python.pdf
Introduction to Python.pdfRahul Mogal
 
ProjectsSummary.pptx
ProjectsSummary.pptxProjectsSummary.pptx
ProjectsSummary.pptxJamesKirk79
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Simplilearn
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiIvo Andreev
 
Intro to H2O Machine Learning in Python - Galvanize Seattle
Intro to H2O Machine Learning in Python - Galvanize SeattleIntro to H2O Machine Learning in Python - Galvanize Seattle
Intro to H2O Machine Learning in Python - Galvanize SeattleSri Ambati
 
Introduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxIntroduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxHassanShah396906
 
Python in the real world : from everyday applications to advanced robotics
Python in the real world : from everyday applications to advanced roboticsPython in the real world : from everyday applications to advanced robotics
Python in the real world : from everyday applications to advanced roboticsJivitesh Dhaliwal
 
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019Sonal Raj
 
Intro to H2O in Python - Data Science LA
Intro to H2O in Python - Data Science LAIntro to H2O in Python - Data Science LA
Intro to H2O in Python - Data Science LASri Ambati
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsSriram Hariharan
 
Unlocking the Potential of AI in Spring.pdf
Unlocking the Potential of AI in Spring.pdfUnlocking the Potential of AI in Spring.pdf
Unlocking the Potential of AI in Spring.pdfInexture Solutions
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets Redar Ismail
 

Similar to Pa1 json requests (20)

Pa2 session 4
Pa2 session 4Pa2 session 4
Pa2 session 4
 
Pa1 session 6
Pa1 session 6Pa1 session 6
Pa1 session 6
 
Aia session2 (1)
Aia session2 (1)Aia session2 (1)
Aia session2 (1)
 
Pa2 session 3
Pa2 session 3Pa2 session 3
Pa2 session 3
 
Introduction to Python.pdf
Introduction to Python.pdfIntroduction to Python.pdf
Introduction to Python.pdf
 
ProjectsSummary.pptx
ProjectsSummary.pptxProjectsSummary.pptx
ProjectsSummary.pptx
 
Solved Big Data and Data Science Projects pdf.pdf
Solved Big Data and Data Science Projects pdf.pdfSolved Big Data and Data Science Projects pdf.pdf
Solved Big Data and Data Science Projects pdf.pdf
 
Python ml
Python mlPython ml
Python ml
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
 
Intro to H2O Machine Learning in Python - Galvanize Seattle
Intro to H2O Machine Learning in Python - Galvanize SeattleIntro to H2O Machine Learning in Python - Galvanize Seattle
Intro to H2O Machine Learning in Python - Galvanize Seattle
 
Introduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxIntroduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptx
 
Introduction_to_Python.pptx
Introduction_to_Python.pptxIntroduction_to_Python.pptx
Introduction_to_Python.pptx
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 
Python in the real world : from everyday applications to advanced robotics
Python in the real world : from everyday applications to advanced roboticsPython in the real world : from everyday applications to advanced robotics
Python in the real world : from everyday applications to advanced robotics
 
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
Internet of Python - IOT with Python and Serverless | Sonal Raj | HydPy Feb 2019
 
Intro to H2O in Python - Data Science LA
Intro to H2O in Python - Data Science LAIntro to H2O in Python - Data Science LA
Intro to H2O in Python - Data Science LA
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIs
 
Unlocking the Potential of AI in Spring.pdf
Unlocking the Potential of AI in Spring.pdfUnlocking the Potential of AI in Spring.pdf
Unlocking the Potential of AI in Spring.pdf
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets
 

More from aiclub_slides

Linear regression middleschool
Linear regression middleschoolLinear regression middleschool
Linear regression middleschoolaiclub_slides
 
Pa2 project template
Pa2 project templatePa2 project template
Pa2 project templateaiclub_slides
 
Knn intro advanced_middleschool
Knn intro advanced_middleschoolKnn intro advanced_middleschool
Knn intro advanced_middleschoolaiclub_slides
 
M1 regression metrics_middleschool
M1 regression metrics_middleschoolM1 regression metrics_middleschool
M1 regression metrics_middleschoolaiclub_slides
 
Ai in real life face detection
Ai in real life   face detectionAi in real life   face detection
Ai in real life face detectionaiclub_slides
 
Res net high level intro
Res net high level introRes net high level intro
Res net high level introaiclub_slides
 
Neural networks and flattened images
Neural networks and flattened imagesNeural networks and flattened images
Neural networks and flattened imagesaiclub_slides
 
What is a_neural_network
What is a_neural_networkWhat is a_neural_network
What is a_neural_networkaiclub_slides
 
How neural networks learn part iii
How neural networks learn part iiiHow neural networks learn part iii
How neural networks learn part iiiaiclub_slides
 
Introduction to deep learning image classification
Introduction to deep learning   image classificationIntroduction to deep learning   image classification
Introduction to deep learning image classificationaiclub_slides
 
Accuracy middleschool
Accuracy middleschoolAccuracy middleschool
Accuracy middleschoolaiclub_slides
 
Introduction to classification_middleschool
Introduction to classification_middleschoolIntroduction to classification_middleschool
Introduction to classification_middleschoolaiclub_slides
 
Introduction to the cloud
Introduction to the cloudIntroduction to the cloud
Introduction to the cloudaiclub_slides
 
Ai lifecycle and navigator
Ai lifecycle and navigatorAi lifecycle and navigator
Ai lifecycle and navigatoraiclub_slides
 
How AIs are different from us level 1
How AIs are different from us   level 1How AIs are different from us   level 1
How AIs are different from us level 1aiclub_slides
 

More from aiclub_slides (20)

Linear regression middleschool
Linear regression middleschoolLinear regression middleschool
Linear regression middleschool
 
Pa2 project template
Pa2 project templatePa2 project template
Pa2 project template
 
Knn intro advanced_middleschool
Knn intro advanced_middleschoolKnn intro advanced_middleschool
Knn intro advanced_middleschool
 
M1 regression metrics_middleschool
M1 regression metrics_middleschoolM1 regression metrics_middleschool
M1 regression metrics_middleschool
 
Mnist images
Mnist imagesMnist images
Mnist images
 
Mnist images
Mnist imagesMnist images
Mnist images
 
Ai in real life face detection
Ai in real life   face detectionAi in real life   face detection
Ai in real life face detection
 
Cnn
CnnCnn
Cnn
 
Res net high level intro
Res net high level introRes net high level intro
Res net high level intro
 
Neural networks and flattened images
Neural networks and flattened imagesNeural networks and flattened images
Neural networks and flattened images
 
What is a_neural_network
What is a_neural_networkWhat is a_neural_network
What is a_neural_network
 
How neural networks learn part iii
How neural networks learn part iiiHow neural networks learn part iii
How neural networks learn part iii
 
Introduction to deep learning image classification
Introduction to deep learning   image classificationIntroduction to deep learning   image classification
Introduction to deep learning image classification
 
Accuracy middleschool
Accuracy middleschoolAccuracy middleschool
Accuracy middleschool
 
Introduction to classification_middleschool
Introduction to classification_middleschoolIntroduction to classification_middleschool
Introduction to classification_middleschool
 
Introduction to the cloud
Introduction to the cloudIntroduction to the cloud
Introduction to the cloud
 
Basics of data
Basics of dataBasics of data
Basics of data
 
Ai basics
Ai basicsAi basics
Ai basics
 
Ai lifecycle and navigator
Ai lifecycle and navigatorAi lifecycle and navigator
Ai lifecycle and navigator
 
How AIs are different from us level 1
How AIs are different from us   level 1How AIs are different from us   level 1
How AIs are different from us level 1
 

Recently uploaded

ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Pa1 json requests

  • 2. AI Club Python with AI – I Json and Requests
  • 3. Modules in Python • Use multiple functions written by others
  • 4. Modules in Python • Use multiple functions written by others • Popular packages: json, requests • How do you tell python to use these packages?
  • 5. JSON Module • JSON (JavaScript Object Notation) • A very popular format to transmit and receive data over web
  • 6. JSON Module • JSON (JavaScript Object Notation) • A very popular format to transmit and receive data over web • How does it work in python? • A json is a string
  • 7. • JSON (JavaScript Object Notation) • A very popular format to transmit and receive data over web • What would the json dump of a dictionary be? JSON Module
  • 8. • JSON (JavaScript Object Notation) • A very popular format to transmit and receive data over web • How does it work in python? • Can any type of variable be dumped? Strings? Lists? JSON Module
  • 9. • JSON (JavaScript Object Notation) • A very popular format to transmit and receive data over web • How does it work in python? • Load a json variable JSON Module
  • 10. • This module helps you to send HTTP requests in python • What are HTTP requests? Requests Module in Python
  • 11. • This module helps you to send HTTP requests in python • How to use HTTP requests to interact with an AI? Requests Module in Python
  • 12. • This module helps you to send HTTP requests in python • How to use HTTP requests to interact with an AI? url: The http url to send request to data: String containing the payload (features in case of AI) Requests Module in Python
  • 13. • This module helps you to send HTTP requests in python • How to use HTTP requests to interact with an AI? Example: data: {“Sentence”: “I am sad”} Requests Module in Python
  • 14. • Login to your Navigator accounts and select the mood AI Lets connect your AI with Python
  • 15. • Login to your Navigator accounts and select the mood AI • Click on the integration tab in the monitor tab Lets connect your AI with Python
  • 16. • Login to your Navigator accounts and select the mood AI • Click on the integration tab in the monitor tab • Select python from the drop down for connectors Lets connect your AI with Python
  • 17. • Login to your Navigator accounts and select the mood AI • Click on the integration tab in the monitor tab • Select python from the drop down for connectors • Copy paste the code into your repl account Lets connect your AI with Python
  • 18. • Login to your Navigator accounts and select the mood AI • Click on the integration tab in the monitor tab • Select python from the drop down for connectors • Copy paste the code into your repl account Lets connect your AI with Python
  • 19. • Copy paste the code into your repl account • Note that the code is a function, you have to call this function to get the prediction json.dumps() converts dictionary to striing Convert the output you receive into readable format Lets connect your AI with Python
  • 20. • Login to your Navigator accounts and select the mood AI • Click on the integration tab in the monitor tab • Select python from the drop down for connectors • Copy paste the code into your repl account • Upload the mood dataset into repl Lets connect your AI with Python
  • 21. • Build a python application powered by AI • Examples • Chatbot • Games • Tanks and bots • Black jack Think about your projects