python 및 머신러닝 교육, 슬로우캠퍼스








Google App Engine 에서 Flask 기반으로 개발하기


PyCharm을 이용하여 GAE(Google App Engine)에 Flask 기반으로 'Hello World'를 만들고,

실제로 deploy 하기까지의 설명을  간단하면서도 잘 설명하였다.


PyCharm 의 Google App Engine 개발 환경 세팅에 대해서도 잘 나와있다.





WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스


google app engine 클라이언트를 설치하면,

개발 PC의 로컬 환경에서 어플리케이션의 동작을 테스트할 수 있는 환경이 주어진다.

웹서버 구동은 dev_appengine.py 파일 실행 또는 app engine launcher를 이용하게 되는데,

구동된 웹서버를 확인할 때, 기본적으로 웹브라우저에서 http://localhost:8080 형식의 주소로 접근하게 된다.



그런데 같은 로컬네트워크 상의 다른 PC나 모바일 기기에서 해당 웹서버에 접근하려고 하면 문제가 발생한다.

http://192.168.0.10:8080 형식의 주소에 대한 바인딩이 이루어지지 않았기 때문이다.

일반적으로 apache나 tomcat 같은 웹서버 환경에서는

자동?으로 http://192.168.0.10 같은 로컬네트워크 주소가 세팅이 되는데에 반해,

python 기반의 google app engine 웹서버에서는 이같은 기능을 기본적으로 제공하지 않고

loopback adapter만 바인딩된다.

그러므로 http://localhost:8080 또는 http://127.0.0.1:8080은 접근 가능하지만,

http://192.168.0.10:8080은 PC의 물리적 네트워크 카드에 웹서버가 바인딩되지 않았기 때문에 접근이 불가능하다.



해결방법:

1. command line 실행 시

- dev_appengine.py의 파라미터에 --host=192.168.0.10 추가



2. google app engine launcher 사용 시

- 목록에서 해당서버 더블클릭

- Application Settings 팝업창 열림

- Launch Setting에 --host=192.168.0.10 추가




참고로 --host='192.168.0.10'이나 --host="192.168.0.10" 등의 quotation은

정상적으로 작동하지 않는다는 점을 유의할 필요가 있다.


by Sangjune Park



'Google App Engine (GAE)' 카테고리의 다른 글

Google App Engine 에서 Flask 기반으로 개발하기  (0) 2014.08.10
App Engine 강의 자료  (0) 2013.07.18
Google Cloud Quotas, Limit  (0) 2013.07.08

WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스


'Software In Life' 장선진 대표의 자료 입니다.


Google App Engine 소개에 좋은 자료.






DataStore 에 대한 설명이 좋은 자료.



WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,

python 및 머신러닝 교육, 슬로우캠퍼스

Google Search API


custom search API 라는 이름으로 바뀌었다. 하루에 100번만 호출 가능하다.

유료로 하루에 최대 1만번 호출가능하며, 1천번당 $5이므로 1만번에 $50가 된다.

curl  -e http://www.my-ajax-site.com  'https://ajax.googleapis.com/ajax/services/search/image?v=1.0&q=Paris%20Hilton'

Free quota

Usage is free for all users, up to 100 queries per day.

Paid Usage

Any usage beyond the free usage quota will fail if you are not signed up for billing. Once you have enabled billing, you will continue to receive 100 free queries per day. However, you will be billed for all additional requests at the rate of $5 per 1000 queries, for up to 10,000 queries per day.



빌링 정보를 입력한 경우 Google Cloud Infra Quotas


Usage Limits

Billing status:

Billing is enabled
Billable API usage will be charged to the Checkout account authorized by xxxx@gmail.com Learn more

Effective limits:


APIPer-User LimitUsedBillable LimitCourtesy Limit
Google Cloud Datastore API500.0 requests/second/user
0%
N/A10,000,000 requests/dayRequest more...
Custom Search API1.0 requests/second/user
0%
100 requests/day100 requests/dayPricing
YouTube Data API v330,000.0 units/second/user
0%
N/A5,000,000 units/dayRequest more...





빌링 정보 입력 없이 일반적인 Google AppEngine Quotas


Resource

Daily Quota

 

 

    Rate 

Requests

 

 

0

Okay

Outgoing Bandwidth

 

0%

0.00 of 1.00 GBytes

Okay

Incoming Bandwidth

 

0%

0.00 of 1.00 GBytes

Okay

Secure Requests

 

 

0

Okay

Secure Outgoing Bandwidth

 

 

0.00 GBytes

Okay

Secure Incoming Bandwidth

 

 

0.00 GBytes

Okay

Frontend Instance Hours

 

0%

0.00 of 28.00 Instance Hours

Okay

Backend Instance Hours

 

0%

0.00 of 9.00 Instance Hours

Okay

Storage

Datastore Write Operations

0%

0.00 of 0.05 Million Ops

Okay

Datastore Read Operations

0%

0.00 of 0.05 Million Ops

Okay

Datastore Small Operations

0%

0.00 of 0.05 Million Ops

Okay

Datastore API Calls

 

0

Okay

Datastore Queries

 

0

Okay

Blobstore API Calls

 

0

Okay

Datastore Stored Data

0%

0.00 of 1.00 GBytes

Okay

Blobstore Stored Data

0%

0.00 of 5.00 GBytes

Okay

Data Sent to Datastore API

 

0.00 GBytes

Okay

Data Received from Datastore API

 

0.00 GBytes

Okay

Datastore Entity Fetch Ops

 

0

Okay

Datastore Entity Put Ops

 

0

Okay

Datastore Entity Delete Ops

 

0

Okay

Datastore Index Write Ops

 

0

Okay

Datastore Query Ops

 

0

Okay

Datastore Key Fetch Ops

 

0

Okay

Datastore Id Allocation Ops

 

0

Okay

Number of Indexes

0%

0 of 200

Okay

Code and Static File Storage

0%

0.00 of 1.00 GBytes

Okay

Prospective Search Subscriptions

0%

0 of 10,000

Okay

Search

Search API Calls

0%

0 of 20,000

Okay

Search API Basic Operations

 

0

Okay

Search API Simple Searches

 

0

Okay

Search API Complex Searches

 

0

Okay

Search Data Indexed

 

0.00 GBytes

Okay

Search Stored Data

0%

0.00 of 0.25 GBytes

Okay

Mail

Mail API Calls

0%

0 of 7,000

Okay

Recipients Emailed

0%

0 of 100

Okay

Admins Emailed

0%

0 of 5,000

Okay

Message Body Data Sent

0%

0.00 of 0.06 GBytes

Okay

Attachments Sent

0%

0.00 of 0.00 GBytes

Okay

Attachment Data Sent

0%

0.00 of 0.10 GBytes

Okay

UrlFetch

UrlFetch API Calls

0%

0 of 657,084

Okay

UrlFetch Data Sent

0%

0.00 of 4.00 GBytes

Okay

UrlFetch Data Received

0%

0.00 of 4.00 GBytes

Okay

Image Manipulation

Image Manipulation API Calls

0

Okay

Data Sent to API

0.00 GBytes

Okay

Data Received from API

0.00 GBytes

Okay

Transformations executed

0

Okay

Memcache

Memcache API Calls

0

Okay

Data Sent to API

0.00 GBytes

Okay

Data Received from API

0.00 GBytes

Okay

XMPP

XMPP API Calls

0%

0 of 46,310,400

Okay

XMPP Data Sent

0%

0.00 of 1,046.00 GBytes

Okay

Recipients Messaged

0%

0 of 46,310,400

Okay

Invitations Sent

0%

0 of 100,000

Okay

Stanzas Sent

0%

0 of 10,000

Okay

Channel

Channel API Calls

0%

0 of 46,310,400

Okay

Channels Created

0%

0 of 100

Okay

Channel API Hours Used

0%

0.00 of 200.00 Channel Hours

Okay

Channel Data Sent

0%

0.00 of 1,046.00 GBytes

Okay

Task Queue

Task Queue API Calls

0%

0 of 100,000

Okay

Task Queue Stored Task Count

0%

0 of 1,000,000

Okay

Task Queue Stored Task Bytes

0%

0.00 of 0.49 GBytes

Okay

Logs

Logs Read Bandwidth

0%

0.00 of 0.10 GBytes

Okay

Logs Stored Data

0%

0.00 of 1.00 GBytes

Okay

Deployments

Deployments

0%

0 of 10,000

Okay

 


 

 

Resource        Used        Free        Billable        Charge

Frontend Instance Hours

$0.08/Hour         0.28         28.00         0.00        $0.00

Discounted Instance Hour

$0.05/Hour         0.00         0.00         0.00        $0.00

Backend Instance Hours

$0.08/Hour         0.00         9.00         0.00        $0.00

Datastore Storage

$0.008/GByte-day         0.01         1.00         0.00        $0.00

Logs Storage

$0.008/GByte-day         0.01         1.00         0.00        $0.00

Taskqueue Storage

$0.008/GByte-day         0.00         0.49         0.00        $0.00

Blobstore Storage

$0.0043/GByte-day         0.01         5.00         0.00        $0.00

Code and Static File Storage

$0.0043/GByte-day         0.01         1.00         0.00        $0.00

Datastore Writes

$1.00/Million Ops         0.00         0.05         0.00        $0.00

Datastore Reads

$0.70/Million Ops         0.01         0.05         0.00        $0.00

Small Datastore Operations

$0.10/Million Ops         0.00         0.05         0.00        $0.00

Bandwidth Out

$0.12/GByte         0.01         1.00         0.00        $0.00

Emails

$0.01/100 Recipients         0.00         1.00         0.00        $0.00

XMPP Stanzas

$0.10/100K Stanzas         0.00         0.10         0.00        $0.00

Opened Channels

$0.01/100 Opens         0.00         1.00         0.00        $0.00

Logs Read Bandwidth

$0.12/GByte         0.00         0.10         0.00        $0.00

PageSpeed Out Bandwidth

$0.39/GByte         0.00         0.00         0.00        $0.00

SSL VIPs

$1.30/Day         0.00         0.00         0.00        $0.00

SSL SNI Certificates

$0.06/Day         0.00         0.00         0.00        $0.00

Total:        $0.00

 


WRITTEN BY
manager@
Data Analysis, Text/Knowledge Mining, Python, Cloud Computing, Platform

,