Docker ドキュメント 全文検索
Results of 1 - 1 of about 1 for mydb (0.001 sec.)
- 開発にコンテナを使う — Docker-docs-ja 24.0 ドキュメント 9414
- 言語別ガイド Python 開発にコンテナを使う 開発にコンテナを使う 事前準備 コンテナとしてイメージを実行 で、イメージ構築をし、それコンテナ化アプリケーションとして実行します。 概要 この章では、これまでのモジュールで構築したアプリケーション
..._name__ ) @app . route ( '/' ) def hello_world (): return 'Hello, Docker!' @app . route ( '/widgets' ) def get_widgets (): mydb = mysql . connector . connect ( host = "mysqldb" , user = "root" , password = "p@ssw0rd1" , database = "inventory" ) curso...r = mydb . cursor () cursor . execute ( "SELECT * FROM widgets" ) row_headers = [ x [ 0 ] for x in cursor . description ] #this wil...( row_headers , result ))) cursor . close () return json . dumps ( json_data ) @app . route ( '/initdb' ) def db_init (): mydb = mysql . connector . connect ( host = "mysqldb" , user = "root" , password = "p@ssw0rd1" ) cursor = mydb . cursor () curs... - https://man.mtool.work/docker/24.0/language/python/develop.html
PREV
1
NEXT