Skip to main content

API client for flask extension

Project description

对requests库的包装,自动组装base_url, HttpBasicAuth

安装

pip install Flask-Auth-Client

Usage

First init:

from flask_auth_client import AuthClient
auth_client = AuthClient()
auth_client.init_app(app)

API

params = {}
resp = auth_client.request('GET', '/users/', params=params)
resp = auth_client.get('/users', params=params)

配置项

配置项 说明
AUTH_CIENT_BASE_URL api的url_prefix
AUTH_CIENT_USERNAME BasicAuth的username
AUTH_CIENT_PASSWORD BasicAuth的password
AUTH_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.

Filename, size & hash SHA256 hash help File type Python version Upload date
Flask-Auth-Client-0.0.4.tar.gz (1.9 kB) Copy SHA256 hash SHA256 Source None Jun 22, 2018

Supported by

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