Docker ドキュメント 全文検索
Results of 1 - 1 of about 1 for cursor (0.001 sec.)
- 開発にコンテナを使う — Docker-docs-ja 24.0 ドキュメント 9414
- 言語別ガイド Python 開発にコンテナを使う 開発にコンテナを使う 事前準備 コンテナとしてイメージを実行 で、イメージ構築をし、それコンテナ化アプリケーションとして実行します。 概要 この章では、これまでのモジュールで構築したアプリケーション
...mydb = mysql . connector . connect ( host = "mysqldb" , user = "root" , password = "p@ssw0rd1" , database = "inventory" ) cursor = mydb . cursor () cursor . execute ( "SELECT * FROM widgets" ) row_headers = [ x [ 0 ] for x in cursor . description ] #t...his will extract row headers results = cursor . fetchall () json_data = [] for result in results : json_data . append ( dict ( zip ( row_headers , result ))) cursor . c...initdb' ) def db_init (): mydb = mysql . connector . connect ( host = "mysqldb" , user = "root" , password = "p@ssw0rd1" ) cursor = mydb . cursor () cursor . execute ( "DROP DATABASE IF EXISTS inventory" ) cursor . execute ( "CREATE DATABASE inventory"... - https://man.mtool.work/docker/24.0/language/python/develop.html
PREV
1
NEXT