restful api client for flask extension
Project description
Usage
First init:
from flask_rest_client import RestCient rest_client = RestClient() rest_client.init_app(app)
API
users_api = rest_client.get_api('users')
j = users_api.get(1).json() # 获取/users/1的数据
j = users_api.get() # 获取/users/的数据
配置项
配置项 |
说明 |
---|---|
REST_CIENT_BASE_URL |
api的url_prefix |
REST_CIENT_USERNAME |
BaseAuth的username |
REST_CIENT_PASSWORD |
BaseAuth的password |
REST_CIENT_VERIFY |
requests的verfy配置,可以是自定义证书的路径 |
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
File details
Details for the file Flask-RestClient-0.1.3.tar.gz
.
File metadata
- Download URL: Flask-RestClient-0.1.3.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
201385d7c30c288e7a2bbf4a6f6b4fae003b142a28b3fae3d3991200b303528f
|
|
MD5 |
2ae002d04ebaf81b29e2af4136acbe2e
|
|
BLAKE2b-256 |
44581ac34a21ee665c356d8cfd1f4ea69c292780f159b1fef2f37e778950d1eb
|