Skip to main content

IP、PV、Endpoint Statistics

Project description

AccessCount

IP、PV、Endpoint 统计插件

Installation

Development

pip install git+https://github.com/saintic/flask-pluginkit-accesscount@master

PyPi Release

pip install flask-pluginkit-accesscount

Usage

from flask_pluginkit import PluginManager

PluginManager(
    plugin_packages=["flask_pluginkit_accesscount"],
    # If Flask-PluginKit version >= 3.10.0, otherwise pip install it.
    install_packages=dict(pkgs=["flask-pluginkit-accesscount"]),
)

Configuration

Flask Config 配置项

PLUGINKIT_ACCESSCOUNT_FLUSH_TIMES

设置本地累计请求多少次后刷入redis,int 类型,默认 100

PLUGINKIT_ACCESSCOUNT_FLUSH_INTERVAL

设置本地累计请求多少秒后刷入redis,int 类型,默认 60

PLUGINKIT_ACCESSCOUNT_KEY_PREFIX

redis key 前缀,str 类型,默认 pluginkit

PLUGINKIT_ACCESSCOUNT_REDIS_NAME

redis client 实例连接名称,str 类型,默认 redis,从 g 获取

PLUGINKIT_ACCESSCOUNT_REDIS_URL

redis 连接地址,str 类型,如果不指定上述NAME,则从该地址连接,两者不能同时缺少。

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

flask_pluginkit_accesscount-0.3.2.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file flask_pluginkit_accesscount-0.3.2.tar.gz.

File metadata

File hashes

Hashes for flask_pluginkit_accesscount-0.3.2.tar.gz
Algorithm Hash digest
SHA256 08dc539b82c702024531a64605b0e690eb6865957388973f489e3d280426bcba
MD5 787b55c02379dbc0b53b90d357f42a13
BLAKE2b-256 f62433346d6abe329b33d39572910e635c96d575199d70a2b56b5a03c75ad205

See more details on using hashes here.

Supported by

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