Results of 1 - 10 of about 16 for requests (0.007 sec.)
- 12. 仮想環境とパッケージ 15110
- 12. 仮想環境とパッケージ 12.1. はじめに Python アプリケーションは、標準ライブラリに含まれないパッケージやモジュールをよく使います。特定のバグの修正が必要だったり、古いバージョンのライブラリのインターフェイスに依存していたりするため、ライブラ
...後に == とバージョン番号を付けると、特定のバージョンをインストールすることもできます: (tutorial-env) $ python -m pip install requests == 2 .6.0 Collecting requests==2.6.0 Using cached requests-2.6.0-py2.py3-none-any.whl Installing collected packages: reque...sts Successfully installed requests-2.6.0 このコマンドを再実行しても、 pip は指定されたバージョンがインストール済みであることを確認して何もしません。別のバージ...on -m pip install --upgrade を実行すればパッケージを最新版に更新できます: (tutorial-env) $ python -m pip install --upgrade requests Collecting requests Installing collected packages: requests Found existing installation: requests 2.6.0 Uninstalling reque... - https://man.mtool.work/python/3.14/tutorial/venv.html
- Logging クックブック 9253
- Logging クックブック Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に有用であるとされていた、logging に関連するいくつものレシピを含んでいます。チュートリアルやリファレンス情報へのリンクについては その他のリソース
...asically logs the record using whatever logging policy is configured locally. """ def handle ( self ): """ Handle multiple requests - each expected to be a 4-byte length, followed by the LogRecord in pickle format. Logs the record according to whatever p...""" def __init__ ( self , method , ip , user ): self . method = method self . ip = ip self . user = user # A dummy set of requests which will be used in the simulation - we'll just pick # from this list randomly. Note that all GET requests are from 192....168.2.XXX # addresses, whereas POST requests are from 192.16.3.XXX addresses. Three users # are represented in the sample requests. REQUESTS = [ Request ( 'GET' , '192... - https://man.mtool.work/python/3.14/howto/logging-cookbook.html
- collections --- コンテナデータ型 8872
- collections --- コンテナデータ型 ソースコード: Lib/collections/__init__.py このモジュールは、汎用の Python 組み込みコンテナ dict , list , set , および tuple に代わる、特殊なコンテナデータ型を実装しています。 namedtuple() 名前付きフィールドを
...わるのを防ぐため、 同じ要求が複数回行われるまでキャッシュに保存しない。 """ def __init__ ( self , func , maxsize = 128 , maxrequests = 4096 , cache_after = 1 ): self . requests = OrderedDict () # { uncached_key : request_count } self . cache = OrderedDict...() # { cached_key : function_result } self . func = func self . maxrequests = maxrequests # キャッシュにない要求の最大数 self . maxsize = maxsize # 保存する戻り値の最大数 self . cache_after = cache_...in self . cache : self . cache . move_to_end ( args ) return self . cache [ args ] result = self . func ( * args ) self . requests [ args ] = self . requests . get ( args , 0 ) + 1 if self . requests [ args ] <= self . cache_after : self . requests . mo... - https://man.mtool.work/python/3.14/library/collections.html
- urllib.robotparser --- robots.txt 用のパーサー 8872
- urllib.robotparser --- robots.txt 用のパーサー ソースコード: Lib/urllib/robotparser.py このモジュールは、 robots.txt ファイルを公開しているウェブサイトから、特定のユーザーエージェントが URL を取得してよいかどうかを判定するクラス RobotFilePa
...dded in version 3.6. request_rate ( useragent ) robots.txt の Request-rate パラメータの内容を、 名前付きタプル RequestRate(requests, seconds) として返します。 パラメータがない、指定した useragent に適用されない、または robots.txt の該当エントリーの構文が...rp . set_url ( "http://www.pythontest.net/robots.txt" ) >>> rp . read () >>> rrate = rp . request_rate ( "*" ) >>> rrate . requests 1 >>> rrate . seconds 1 >>> rp . crawl_delay ( "*" ) 6 >>> rp . can_fetch ( "*" , "http://www.pythontest.net/" ) True >>>... - https://man.mtool.work/python/3.14/library/urllib.robotparser.html
- What's New In Python 3.8 8716
- What's New In Python 3.8 編集者 : Raymond Hettinger この記事では Python 3.7 と比較した Python 3.8 の新機能を解説します。 Python 3.8 は 2019 年 10 月 14 日にリリースされました。 詳しくは 変更履歴 を参照してください。 概要 -- リリースハイライ
...ストールされたパッケージのバージョンを得たり、エントリーポイントの一覧を得たりできます: >>> # 以下の例には広く使われている "requests" パッケージの >>> # インストールが必要です。 >>> >>> from importlib.metadata import version , requires , files >>> version...( 'requests' ) '2.22.0' >>> list ( requires ( 'requests' )) ['chardet (<3.1.0,>=3.0.2)'] >>> list ( files ( 'requests' ))[: 5 ] [Packa...gePath('requests-2.22.0.dist-info/INSTALLER'), PackagePath('requests-2.22.0.dist-info/LICENSE'), PackagePath('requests-2.22.0.dist-info/MET... - https://man.mtool.work/python/3.14/whatsnew/3.8.html
- termios --- POSIX スタイルの端末制御 8646
- termios --- POSIX スタイルの端末制御 このモジュールでは端末 I/O 制御のための POSIX 準拠の関数呼び出しインターフェースを提供します。これら呼び出しのための完全な記述については、 Unix マニュアルページの termios(3) を参照してください。これは PO
...ios.TIOCGWINSZ または termios.TIOCGSIZE が必要です。 Added in version 3.11. termios. TIOCGWINSZ termios. TIOCGSIZE ioctl() requests for querying the tty window size. Not defined on all platforms; tcgetwinsize() requires at least one of them. termios. tcs...ち、少なくとも一方の組が定義されている必要があります。 Added in version 3.11. termios. TIOCSWINSZ termios. TIOCSSIZE ioctl() requests for setting the tty window size. Not defined on all platforms; see tcsetwinsize() for the required pairs. 参考 tty モジュー... - https://man.mtool.work/python/3.14/library/termios.html
- importlib.metadata -- パッケージメタデータへのアクセス 8196
- importlib.metadata -- パッケージメタデータへのアクセス Added in version 3.8. バージョン 3.10 で変更: importlib.metadata は暫定的なものではなくなりました。 ソースコード: Lib/importlib/metadata/__init__.py importlib.metadata は、インストール済
...と、 query_distributions は、クエリに一致するデータベース内の各配布物のレコードを返すことになります。 例えば、データベースに requests-1.0 があれば、 Context(name='requests') または Context(name=None) に対して find_distributions は DatabaseDistribution を y... - https://man.mtool.work/python/3.14/library/importlib.metadata.html
- http --- HTTP モジュール群 8109
- http --- HTTP モジュール群 ソースコード: Lib/http/__init__.py http は、HyperText Transfer Protocol を扱ういくつかのモジュールをまとめたパッケージです。 http.client は低水準のHTTPプロトコルのクライアントです。高水準の URL を開く操作には urll
...RED HTTP Semantics RFC 9110 , Section 15.5.22 428 PRECONDITION_REQUIRED Additional HTTP Status Codes RFC 6585 429 TOO_MANY_REQUESTS Additional HTTP Status Codes RFC 6585 431 REQUEST_HEADER_FIELDS_TOO_LARGE Additional HTTP Status Codes RFC 6585 451 UNAVAI... - https://man.mtool.work/python/3.14/library/http.html
- メモリ管理 7884
- メモリ管理 概要 Python におけるメモリ管理には、全ての Python オブジェクトとデータ構造が入ったプライベートヒープ (private heap) が必須です。プライベートヒープの管理は、内部的には Python メモリマネージャ (Python memory manager) が確実に行いま
...n module. Even when the requested memory is used exclusively for internal, highly specific purposes, delegating all memory requests to the Python memory manager causes the interpreter to have a more accurate image of its memory footprint as a whole. Cons... - https://man.mtool.work/python/3.14/c-api/memory.html
- http.client --- HTTP プロトコルクライアント 7884
- http.client --- HTTP プロトコルクライアント ソースコード: Lib/http/client.py このモジュールでは HTTP および HTTPS プロトコルのクライアントサイドを実装しているクラスを定義しています。通常、このモジュールは直接使いません --- urllib.request モ
...HTTP や HTTPS を使った URL を扱う上でこのモジュールを使います。 参考 より高水準の HTTP クライアントインターフェースとして Requests パッケージ が推奨されています。 注釈 HTTPS のサポートは、Python が SSL サポート付きでコンパイルされている場合にのみ利用でき... - https://man.mtool.work/python/3.14/library/http.client.html