semvec/pypi-packages huggingface dataset:
mwauth 0.4.27
maxwin auth

        
        mwauth
        ===============
        
        maxwin 团队 的确权管理
        
        auth的使用
        ----------------------
        
        > __init__.py 中创建Auth对象
        
        .. code-block:: python
        
            from mwauth.kong_auth import KongAuth
            from mwauth.redis_session import RedisSessionInterface
            # 会话存redis
            rds = FlaskRedis(strict=False)
            auth = KongAuth()
        
            # 创建APP
            app = Flask(__name__)
            # 初始化 app
            rds.init_app(app)
            auth.init_app(app)
            app.session_interface = RedisSessionInterface(app, rds)
        
        
        > 调用认证代码,代码基于 swagger
        
        .. code-block:: python
        
            # 检查 员工的浏览权限
            @auth.valid_login
            def employees_id_get(id,jwt = None):
                pass
        
            # 检查员工的删除
            @auth.valid_login
            @p.check('employee',["delete"])
            def employees_id_delete(id,jwt = None):
                pass
        
            @auth.valid_login
            def employee_check_auth():
                # 检查是否有看到身份证的权限
                p.check_permission('empolyee','see_ID')
        
        
        安装方法
        ------------
        ``pip install mwauth``
        
        Changes
        =======
        
        0.4.25(2018-12-11)
        ------------------
        
        - 认证数据中增加companyid
        
        0.4.24(2018-10-31)
        ------------------
        
        - 修正非unicode中文环境下的gbk 错误
        
        0.4.23(2018-10-30)
        ------------------
        
        - 修正readme
        
        0.4.22(2018-10-30)
        ------------------
        
        - 增加readme
Keywords: maxwin commonlib auth
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6