# ByteDanceCamp **Repository Path**: breakman99/byte-dance-camp ## Basic Information - **Project Name**: ByteDanceCamp - **Description**: 字节训练营:app更新项目 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2021-11-01 - **Last Updated**: 2021-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 启动流程 ## 第一步:在项目根目录下的命令行输入如下命令,安装依赖库 pip3 install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com ## 第二步:在项目根目录下的命令行输入如下命令(二选一) ### 本地启动 uvicorn main:app --reload ### Linux下后台启动 setsid uvicorn main:app --host 0.0.0.0 --port 8000 --reload ## 第三步:打开http://127.0.0.1:8000/docs # 白名单查询测试 1. 测试基于布隆过滤器的白名单效率 http://127.0.0.1:8000/docs#/VersionConfig/create_list_VersionConfig_create_list_post 参数: - version_bid:14.01.01.16【该数据是数据库中一条没有删除且正在上线的数据,否则查询失败】 - length: 1000000 【保存1000000条数据,保存的每一条数据为字符串”HUAWEI-MATE-PRO-xxx“】其中xxx为1~1000000中的一个数字 生成之后来到该接口:http://127.0.0.1:8000/docs#/VersionConfig/id_in_whitelist_VersionConfig_id_in_whitelist_get 参数: - version:14.01.01.16【查询某条规则的白名单】 - id:HUAWEI-MATE-PRO-1122【HUAWEI-MATE-PRO-xxxx,xxxx为刚刚生成的数字中的一个】