Skip to main content

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


Release history Release notifications

This version
History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
Flask-RestClient-0.1.3.tar.gz (1.9 kB) Copy SHA256 hash SHA256 Source None Jun 9, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page