Python client for Perforce Helix Swarm (review board)
Project description
helix-swarm
Python client for Perforce Helix Swarm (review board)
Installation
pip3 install helix-swarm
Usage
There is same API interface for sync and async client versions, underhood it uses
requests
and asyncio
respectively. Also you must select REST API version you
want yo use in host url like: http://server/api/v9
Examples
Get review info:
from helixswarm import SwarmClient
client = SwarmClient('http://server/api/v9', 'login', 'password')
review = client.reviews.get(12345)
print(review['review']['author'])
Add comment to review (async):
import asyncio
from helixswarm import SwarmAsyncClient
client = SwarmAsyncClient('http://server/api/v5', 'login', 'password')
async def example():
await client.comments.add('reviews/12345', 'my awesome comment')
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(example())
finally:
loop.run_until_complete(client.close())
loop.close()
Please look at tests directory for more examples.
Testing
Prerequisites: tox
Then just run tox, all dependencies and checks will run automatically
tox
Contributing
Feel free to any contributions
Official REST API documentation:
https://www.perforce.com/manuals/swarm/Content/Swarm/swarm-apidoc.html
Version | Date | Notes |
---|---|---|
v10 | October 2019 | Integration with CI tools |
v9 | April 2018 | Review append and replace changelist, 2fa, mark comment as read |
v8 | December 2017 | Default reviewers |
v7 | October 2017 | Groups as review participants, groups as moderators of project |
v6 | May 2017 | Activity dashboard, archiving reviews, cleaning reviews, for voting reviews |
v5 | October 2016 | Limiting comments to a specific review version |
v4 | October 2016 | Private projects, file-level and line-level inline comments |
v3 | September 2016 | Comments management |
v2 | May 2016 | Projects, groups |
v1.2 | October 2015 | Author filter to the list reviews endpoint |
v1.1 | January 2015 | Required reviewers |
v1 | July 2014 | Initial |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
helix-swarm-0.2.2.tar.gz
(8.5 kB
view hashes)
Built Distribution
Close
Hashes for helix_swarm-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44044345a757c7dc53a9dc5174605259c742dea541d3615e812571a6d4361f9f |
|
MD5 | aa007ba96267f413a9d99202f83dc13b |
|
BLAKE2b-256 | 89b983b2df96b1067ce9d7f7097059de4f3e8abeb5ada23179dbe853db07f5ba |