Python client for Helix Swarm
Package supports sync and async syntax with same code base.
from helixswarm import SwarmAsyncClient, SwarmClient
Documentation
Installation
There are two identical packages: helix-swarm and alias helixswarm, alias was created one year later due name confusion, to be import name and package name will the same.
pip3 install helixswarm
Examples
Get review info:
from helixswarm import SwarmClient
client = SwarmClient('http://server/api/v9', 'user', 'password')
review = client.reviews.get_info(12345)
print(review['review']['author'])
Add comment to review in async way (be careful SwarmAsyncClient must be called inside async function):
import asyncio
from helixswarm import SwarmAsyncClient
async def example():
client = SwarmAsyncClient('http://server/api/v5', 'user', 'password')
await client.comments.add('reviews/12345', 'my awesome comment')
asyncio.run(example())
Update credentials handler:
import requests
from helixswarm import SwarmClient
def get_credentials():
response = requests.get(...).json()
return response['user'], response['password']
client = SwarmClient(
'http://server/api/v9',
'user',
'password',
auth_update_callback=get_credentials
)
# let's suppose credentials are valid now
review = client.reviews.get_info(12345)
print(review['review']['author'])
# now, after some time, password of user somehow changed, so our callback
# will be called, new credentials will be using for retry and future
# here we get also correct review data instead of SwarmUnauthorizedError
# exception
review = client.reviews.get_info(12345)
print(review['review']['author'])
Testing
Prerequisites: tox
Then just run tox, all dependencies and checks will run automatically
tox
Contributing
Feel free to any contributions.
Latest version of code can be download from official page: https://www.perforce.com/downloads/helix-swarm
Official REST API documentation
API |
Date |
Notes |
|---|---|---|
October 2019 |
Integration with CI tools |
|
April 2018 |
Review append and replace changelist, 2fa, mark comment as read |
|
December 2017 |
Default reviewers |
|
October 2017 |
Groups as review participants, groups as moderators of project |
|
May 2017 |
Activity dashboard, archiving reviews, cleaning reviews, for voting reviews |
|
v5 |
October 2016 |
Limiting comments to a specific review version |
October 2016 |
Private projects, file-level and line-level inline comments |
|
v3 |
September 2016 |
Comments management |
May 2016 |
Projects, groups |
|
October 2015 |
Author filter to the list reviews endpoint |
|
January 201 |
Required reviewers |
|
July 2014 |
Initial |
Metadata
Release files for helix-swarm 0.7.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| helix-swarm-0.7.4.tar.gz | 27.6 kB | Without provenance | Details for helix-swarm-0.7.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| helix_swarm-0.7.4-py3-none-any.whl | Python 3 | none | any | Details for helix_swarm-0.7.4-py3-none-any.whl |
Total release size: 66.5 kB
Release files / helix-swarm-0.7.4.tar.gz
| Download URL | helix-swarm-0.7.4.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
405c7cd55bc4b32285c0a9c646176c223977eca5dc420e82572e23561593c528
|
|
BLAKE2b-256 checksum How to use checksums |
85d93a2bfb0bd97d9124decba07c5703f3d88e71219d7863c12138b162cbbbdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / helix_swarm-0.7.4-py3-none-any.whl
| Download URL | helix_swarm-0.7.4-py3-none-any.whl |
|---|---|
| Size | 38.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a91c50e7b3e5262b21cbf2b70c81689a14170ebef24f68883fa17820aa304492
|
|
BLAKE2b-256 checksum How to use checksums |
212fdc3ae98d5d2720eea4d926ebe09a96e7ece27d658340a791c57f68440333
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for helix-swarm 0.7.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.