SlideShare a Scribd company logo
Python
1
2019/02/22
OSC LT Python
Copyright © 2019 Toranoana Inc. All Rights Reserved.
2
Copyright © 2019 Toranoana Inc. All Rights Reserved.
Java JS
3
Copyright © 2019 Toranoana Inc. All Rights Reserved.
• Python?
•
•
•
Python?
Java JavaScript
↓
4
Copyright © 2019 Toranoana Inc. All Rights Reserved.
Python?
5
Copyright © 2019 Toranoana Inc. All Rights Reserved.
6
Copyright © 2019 Toranoana Inc. All Rights Reserved.
Web AP DB
nginx
nginx http https
KEEPER
Rails MySQL
7
Copyright © 2019 Toranoana Inc. All Rights Reserved.
Web AP DB
Web
http://toranoana-keeper.com/ HTTP
HTTP 301
8
Copyright © 2019 Toranoana Inc. All Rights Reserved.
Web AP DB
AP
https://toranoana-keeper.com/ (TOP )
HTTP 200
9
Copyright © 2019 Toranoana Inc. All Rights Reserved.
Web AP DB
DB
https://toranoana-keeper.com/search ( )
GET :'search[q]'='aaaa'
HTTP 200
10
Copyright © 2019 Toranoana Inc. All Rights Reserved.
Web AP DB
slack
#pyenv
pyenv install 3.6.8
pyenv local 3.6.8
#HTTP Requests
pip install requests
11
(Web )
#
import requests
#Web (allow_redirects=False
)
url = "http://toranoana-keeper.com/"
r = requests.get(url,allow_redirects=False)
print (r.status_code, r.reason)
↓
301 Moved Permanently
12
(AP )
#
import requests
#AP
url = "https://toranoana-keeper.com/"
r = requests.get(url)
print (r.status_code, r.reason)
↓
200 OK
13
(DB )
#
import requests
#DB
url = "https://toranoana-keeper.com/search"
r = requests.get(url,params={'search[q]': 'aaaa'})
print (r.status_code, r.reason)
↓
200 OK
14
(slack )
#slack
import json
def post_slack(check_name, check_result):
message = " :" + check_name + "¥n"
message += " :" + check_result + "¥n"
print(message)
slack_url = "https://hooks.slack.com/services/*****/*****/*****"
payload_dic = {
"username": " ",
"text": message
}
r = requests.post(slack_url, data=json.dumps(payload_dic))
n.dumps(payload_dic))
15
16
17
HTTP
HTTP
slack
slack
Raspberry Pi

More Related Content

PDF
HTTP/2 - for TCP/IP Geeks Stockholm
PPTX
Simple Tips to Secure your WordPress
PDF
api analytics redis bigquery. Lrug
PDF
High performance networking with HTTP/2 and OkHTTP 3
PDF
Http/2 - What's it all about?
PDF
Django at Scale
PDF
Let's read code: python-requests library
PDF
Let's read code: the python-requests library
HTTP/2 - for TCP/IP Geeks Stockholm
Simple Tips to Secure your WordPress
api analytics redis bigquery. Lrug
High performance networking with HTTP/2 and OkHTTP 3
Http/2 - What's it all about?
Django at Scale
Let's read code: python-requests library
Let's read code: the python-requests library

Similar to Pythonの勉強がてら死活監視ツールを作った話 (20)

PDF
Crawler 2
PDF
Python Load Testing - Pygotham 2012
PDF
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
PDF
Pycon - Python for ethical hackers
KEY
Python在豆瓣的应用
PPT
Introduction to python scrapping
PDF
An Introduction to Tornado
PDF
Launching Python Cloud Services for AI/IoT Projects
PDF
Web Development with Python and Django
PDF
Python for Penetration testers
PDF
Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...
PDF
From Writing to Publishing makesite.py - Sunaina Pai - PyCon UK 2018
PPTX
Python programming language
PDF
Finding target for hacking on internet is now easier
KEY
Ladypy 01
PDF
Python for web security - beginner
PDF
Python and the Web
PDF
ApacheConNA 2015: What's new in Apache httpd 2.4
PDF
Python & Django TTT
PPTX
Python Lecture 0
Crawler 2
Python Load Testing - Pygotham 2012
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
Pycon - Python for ethical hackers
Python在豆瓣的应用
Introduction to python scrapping
An Introduction to Tornado
Launching Python Cloud Services for AI/IoT Projects
Web Development with Python and Django
Python for Penetration testers
Website Monitoring with Distributed Messages/Tasks Processing (AMQP & RabbitM...
From Writing to Publishing makesite.py - Sunaina Pai - PyCon UK 2018
Python programming language
Finding target for hacking on internet is now easier
Ladypy 01
Python for web security - beginner
Python and the Web
ApacheConNA 2015: What's new in Apache httpd 2.4
Python & Django TTT
Python Lecture 0
Ad

More from 虎の穴 開発室 (20)

PDF
FizzBuzzで学ぶJavaの進化
PDF
Railsのデバッグ どうやるかを改めて確認する
PDF
虎の穴ラボ エンジニア採用説明資料 .pdf
PDF
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
PDF
toranoana.deno #6 アジェンダ 採用説明
PDF
Deno 向け WEB 開発用のツールを作ったので 紹介します
PDF
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
PDF
GCPの画像認識APIの紹介
PDF
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
PDF
GitHub APIとfreshで遊ぼう
PDF
通販開発部の西田さん「通販開発マネジメントの5ルール」
PDF
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
PDF
セキュリティを強化しよう!CloudArmorの機能解説
PDF
JavaScript LT会 〜 React.js Node.js歓迎 〜 Deno で やってみるweb開発
PDF
Amplify Studioを使ってみた
PDF
いいテスト会 (スプリントレビュー) をやろう!
PDF
【Saitama.js】Denoのすすめ
PDF
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
PDF
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
PDF
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
FizzBuzzで学ぶJavaの進化
Railsのデバッグ どうやるかを改めて確認する
虎の穴ラボ エンジニア採用説明資料 .pdf
Deno Deployと組み合わせるのに Upstashをおすすめしたい.pdf
toranoana.deno #6 アジェンダ 採用説明
Deno 向け WEB 開発用のツールを作ったので 紹介します
Supabase Edge Functions と Netlify Edge Functions を使ってみる – 機能とその比較 –
GCPの画像認識APIの紹介
【エンジニアの勉強法ハックLT- vol.7】ゲームから学んだ勉強のこと
GitHub APIとfreshで遊ぼう
通販開発部の西田さん「通販開発マネジメントの5ルール」
社内DX推進!非エンジニア向けにプログラミング講座を実施してみた!
セキュリティを強化しよう!CloudArmorの機能解説
JavaScript LT会 〜 React.js Node.js歓迎 〜 Deno で やってみるweb開発
Amplify Studioを使ってみた
いいテスト会 (スプリントレビュー) をやろう!
【Saitama.js】Denoのすすめ
虎の穴ラボ Tech day#3 チームで戦う!とらのあな通販冬の大感謝祭でのフロント開発について
【とらのあなラボ Tech Day #3】新規システムにおける技術選定〜GoとgRPCを採用した話〜
虎の穴ラボ TechDay#3 フルリモート率100%!リモートワークを可能にするマネージメント
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
August Patch Tuesday
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Mushroom cultivation and it's methods.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cloud_computing_Infrastucture_as_cloud_p
A comparative study of natural language inference in Swahili using monolingua...
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A comparative analysis of optical character recognition models for extracting...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A Presentation on Artificial Intelligence
August Patch Tuesday
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
SOPHOS-XG Firewall Administrator PPT.pptx
Mushroom cultivation and it's methods.pdf
Assigned Numbers - 2025 - Bluetooth® Document
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Spectroscopy.pptx food analysis technology
Unlocking AI with Model Context Protocol (MCP)

Pythonの勉強がてら死活監視ツールを作った話