speedcurve api的python包装器(https://api.speedcurve.com/)
speedcurve.p的Python项目详细描述
用于SpeedCurve API v1周围的python包装器。受到github3.py
的严重影响示例使用
fromspeedcurveimportSpeedCurvesc=SpeedCurve(api_key='your-api-key-here')# Get all sites for a usersites=sc.sites()# Get trends and all tests for a URLurls=sc.urls()# Get trends and chrome tests for a URLurls=sc.url(browser='14419')# Get a testtest=sc.test(id='140317_BA_3W8')# Get all the notes for the main sitenotes=sc.notes()# Add a note. Timestamp defaults to now()note=sc.create_note(note="Cleared CDN Cache",detail="Testing origin response times")# Get latest deploymentlatest_deployment=sc.get_latest_deployment()# Get a deployment specified by iddeployment=sc.get_deployment(id=16627)# Add a deployment to default Site for API keysc.add_deployment(note="Code deployment",detail="Triggered a deployment to test session capability")# Add a deployment and trigger round of testing specified by site idsc.add_deployment(site_id=123,note="Code deployment",detail="Triggered a deployment to test origin response times.""")
测试
运行pip install -r dev-requirements.txt
。然后可以执行tox
。
贡献
- 分叉存储库并进行更改(将自己添加到authors.rst)
- 通过运行tox在本地测试更改
- 将更改压缩为单个提交
- 创建对development的拉取请求分支
注:
如果没有100%的测试覆盖率,travis ci将失败。请在找零钱时附上一份测验。