Skip to main content

网络请求 (requests)

介绍

优雅简单的 python requests 库的草蟒中文版

安装方法

python -m pip install -U grasspy-requests

使用简介

GET 基本使用:

   >>> 导入 网络请求
   >>> 响应 = 网络请求.查_get('https://www.grasspy.cn')
   >>> 响应.状态码
   200
   >>> '中文编程'  响应.内容.解码('utf-8')
   True

...  POST:

   >>> 数据 = 字典型(key1='value1', 键2='值2')
   >>> 响应 = 网络请求.增_post('https://httpbin.org/post', 数据=数据)
   >>> 打印(响应.文本)
   {
     ...
     "form": {
       "key1": "value1",
       "\u952e2": "\u503c2"
     },
     ...
   }

当然也支持其他 HTTP 方法.

Release files for grasspy-requests 0.3.2271

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grasspy-requests 0.3.2271
File Size Uploaded
grasspy-requests-0.3.2271.tar.gz 17.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for grasspy-requests 0.3.2271
File Interpreter ABI Platform
grasspy_requests-0.3.2271-py3-none-any.whl Python 3 none any Details

Total release size: 38.2 kB

Release files / grasspy-requests-0.3.2271.tar.gz

Download URL grasspy-requests-0.3.2271.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
67996111cc31a2b86327c19e5832f9fb843b8f88a243fa229ddc79a53ef79033
BLAKE2b-256 checksum
How to use checksums
12ad58824cdb64766b278fa6b947666647f2a22782e66f987dd802d579cbdf36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1+

Release files / grasspy_requests-0.3.2271-py3-none-any.whl

Download URL grasspy_requests-0.3.2271-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49af13836da9b6a6d25d9ae8975ce4ed5107e9b66b14c2b1ad57ebd4210a6417
BLAKE2b-256 checksum
How to use checksums
18e03643e680702998dfc599d49b4b3510b6216f6fa52ba06b38344a74493813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1+

Release history Release notifications | RSS feed

This release

0.3.2271 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page