Python client for the Angles Dashboard API
Project description
angles-python-client
A small Python client for the Angles Dashboard REST API, which allows python test frameworks to publish their automated test results.
Install (local / editable)
pip install -e .
Quick usage (singleton reporter)
Use angles_reporter when you want one simple process-wide reporter.
from angles_python_client import angles_reporter
from angles_python_client.models import Artifact, ScreenshotPlatform, Platform
angles_reporter.set_base_url("http://127.0.0.1:3000/rest/api/v1.0/")
build = angles_reporter.start_build(
name="TestRunName",
team="Team",
environment="Environment",
component="Component",
phase="optional-phase",
)
angles_reporter.add_artifacts([
Artifact(groupId="angles-ui", artifactId="anglesHQ", version="1.0.0")
])
angles_reporter.start_test(title="test1", suite="suite1")
angles_reporter.add_action("My first action")
platform = ScreenshotPlatform(
platformName="Android",
platformVersion="10",
browserName="Chrome",
browserVersion="89.0",
deviceName="Samsung Galaxy S9",
)
screenshot = angles_reporter.save_screenshot_with_platform(
file_path="/path/to/screenshot.png",
view="view_1",
tags=["smoke", "home"],
platform=platform,
)
angles_reporter.info_with_screenshot("Checking my view on android", screenshot.get("_id"))
angles_reporter.pass_step("Assertion", expected="true", actual="true", info="Just doing an assertion")
angles_reporter.fail_step("Assertion", expected="true", actual="false", info="Just doing an assertion")
execution = angles_reporter.save_test()
Independent reporters for isolated state
Create AnglesReporter(...) instances directly when you need more than one live reporter at once, for example when publishing multiple builds or environments in parallel. Each instance keeps its own current_build, current_execution, and current_action state.
from angles_python_client import AnglesReporter
reporter_gib = AnglesReporter(base_url="https://angles-api.example/rest/api/v1.0/")
reporter_games_dev = AnglesReporter(base_url="https://angles-api.example/rest/api/v1.0/")
reporter_gib.start_build(
name="[suite] test-suite integration",
team="some-team",
environment="integration",
component="some-component",
)
reporter_games_dev.start_build(
name="[suite] test-suite dev",
team="some-team",
environment="dev",
component="some-component",
)
AnglesReporter.get_instance() and the module-level angles_reporter still return the shared convenience singleton.
AnglesReporter.get_instance_with_base_url(...) is kept for backward compatibility, but it now returns a fresh reporter bound to that base URL instead of reusing shared mutable reporting state.
Direct requests usage
from angles_python_client import AnglesHttpClient
from angles_python_client.requests import BuildRequests
http = AnglesHttpClient(base_url="http://127.0.0.1:3000/rest/api/v1.0/")
builds = BuildRequests(http)
build = builds.get_build("your-build-id")
Publish a release to PyPI
-
Bump
project.versioninpyproject.toml -
Push a tag like
v1.0.1:git tag v1.0.1 git push origin v1.0.1
The workflow .github/workflows/publish.yml will build and publish to PyPI.
Publish to TestPyPI first (optional)
-
Push a tag like
test-v1.0.1, or run thePublish to TestPyPIworkflow manually. -
Install from TestPyPI to validate:
python -m pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple angles-python-client
Build locally (manual)
python -m pip install -U pip build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
Versioning
This project uses a standard pyproject.toml version = "X.Y.Z" field.
Bump version locally (and create a tag)
pip install -U bump2version
bump2version patch # or minor / major
git push --follow-tags
Bump via GitHub Actions (and publish)
Run the Bump version and tag workflow (Actions tab) and choose:
target=pypi→ creates a tag likev1.0.1(triggers the PyPI publish workflow)target=testpypi→ creates a tag liketest-v1.0.1(triggers the TestPyPI publish workflow)
Auto-release on main/master
This repo includes an optional workflow: .github/workflows/release-on-main.yml.
When enabled (it is committed by default), every push to main or master will:
- Read the current
project.versionfrompyproject.toml - Create and push a git tag
vX.Y.Z(if it doesn't already exist) - Build and publish to PyPI (Trusted Publishing)
- Bump the version patch for the next release and push that commit back to the default branch
To avoid loops, the post-bump commit includes [skip release] and the workflow ignores commits containing that marker.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file angles_python_client-1.0.10.tar.gz.
File metadata
- Download URL: angles_python_client-1.0.10.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
658cedb4346b1f206f5a9885f72b417c023c6838265cf29e47f121636e003954
|
|
| MD5 |
44ca59180c2497c44929b171e0640448
|
|
| BLAKE2b-256 |
513e62c77392072e4e13c7c2fc61f9abc0f99e60bc70619faa29d0acfe0e9da4
|
Provenance
The following attestation bundles were made for angles_python_client-1.0.10.tar.gz:
Publisher:
release-on-main.yml on AnglesHQ/angles-python-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
angles_python_client-1.0.10.tar.gz -
Subject digest:
658cedb4346b1f206f5a9885f72b417c023c6838265cf29e47f121636e003954 - Sigstore transparency entry: 2088225512
- Sigstore integration time:
-
Permalink:
AnglesHQ/angles-python-client@045b909d2329b05464cd6e0940a915f0750e9cbd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AnglesHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-on-main.yml@045b909d2329b05464cd6e0940a915f0750e9cbd -
Trigger Event:
push
-
Statement type:
File details
Details for the file angles_python_client-1.0.10-py3-none-any.whl.
File metadata
- Download URL: angles_python_client-1.0.10-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebd1f0fa0d745ebaf288050f05ef0438dfe97b3769c775ecd1732ba596ed7b9b
|
|
| MD5 |
91c4400dda17f503ee8ccceae3716e34
|
|
| BLAKE2b-256 |
71e29bb3bd541b2a676788a2937a4aec28d3a146e5769023744f3a0d3730f8b3
|
Provenance
The following attestation bundles were made for angles_python_client-1.0.10-py3-none-any.whl:
Publisher:
release-on-main.yml on AnglesHQ/angles-python-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
angles_python_client-1.0.10-py3-none-any.whl -
Subject digest:
ebd1f0fa0d745ebaf288050f05ef0438dfe97b3769c775ecd1732ba596ed7b9b - Sigstore transparency entry: 2088225613
- Sigstore integration time:
-
Permalink:
AnglesHQ/angles-python-client@045b909d2329b05464cd6e0940a915f0750e9cbd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AnglesHQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-on-main.yml@045b909d2329b05464cd6e0940a915f0750e9cbd -
Trigger Event:
push
-
Statement type: