Skip to main content

Chinsese version of requests for grasspy

Project description

网络请求 (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 方法.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grasspy-requests-0.3.2271.tar.gz (17.2 kB view hashes)

Uploaded Source

Built Distribution

grasspy_requests-0.3.2271-py3-none-any.whl (21.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page