Spectator-py
Python thin-client metrics library for use with Atlas and SpectatorD.
See the Atlas Documentation site for more details on spectator-py.
Local Development
Install pyenv, possibly with Homebrew, and install a recent Python version.
make setup-venv
make test
make coverage
Releasing
Releases are published to PyPI by the Release workflow, which runs when a vX.Y.Z tag is
created in Netflix/spectator-py. The workflow builds the tagged commit without running the tests,
so only release a commit that has passed CI.
-
Bump the version in
pyproject.tomlin a pull request (example). Use semantic versioning: patch for fixes, minor for new features, major for breaking changes to the public API (__all__inspectator/__init__.py). Merge it and wait for the Snapshot build onmainto pass. -
Check that
mainhas the new version. The tag must point at a commit whose version matches it. If it doesn't, the Release workflow stops before building and nothing is uploaded.git fetch origin git show origin/main:pyproject.toml | grep '^version'
-
Create the release. This creates the tag, which starts the Release workflow, and generates the release notes from the merged pull requests.
gh release create vX.Y.Z --repo Netflix/spectator-py --target main --title vX.Y.Z --generate-notes
Or on GitHub: Releases > Draft a new release, create the tag
vX.Y.Zonmain, and click Generate release notes. -
Confirm the publish. Check that the Release workflow run succeeded and that
X.Y.Zappears on PyPI.
If the publish fails
-
Tag vX.Y.Z does not match version ... in pyproject.tomlmeans the version bump was not onmainwhen the release was created. Nothing was uploaded: merge the bump, then recreate the release as below. -
If
X.Y.Zdid not reach PyPI, delete the release and its tag, fix the problem, and create the release again:gh release delete vX.Y.Z --repo Netflix/spectator-py --cleanup-tag --yes
-
PyPI never accepts the same version twice, even after it is deleted there. If
X.Y.Zreached PyPI, release the next version instead. -
An authentication error at the publish step means the
PYPI_API_TOKENrepository secret needs to be replaced.
Release candidates
Set the version to X.Y.ZrcN (for example 1.3.0rc1), tag it vX.Y.Z-rc.N (for example
v1.3.0-rc.1), and add --prerelease to gh release create. pip only installs release candidates
when asked, for example with pip install --pre netflix-spectator-py.
Manual release
Only if GitHub Actions is unavailable. You need maintainer access to the PyPI project and an API token for it. Follow steps 1 to 3, then upload from the tag:
git checkout vX.Y.Z
make setup-venv
make check-manifest # builds dist/ and runs twine check
TWINE_USERNAME=__token__ venv/bin/twine upload dist/* # paste the API token when prompted
Metadata
Release files for netflix-spectator-py 1.2.2
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 |
|---|---|---|---|---|
| netflix_spectator_py-1.2.2.tar.gz | 22.5 kB | Without provenance | Details for netflix_spectator_py-1.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netflix_spectator_py-1.2.2-py3-none-any.whl | Python 3 | none | any | Details for netflix_spectator_py-1.2.2-py3-none-any.whl |
Total release size: 50.8 kB
Release files / netflix_spectator_py-1.2.2.tar.gz
| Download URL | netflix_spectator_py-1.2.2.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
610549a8d95a045ab94dc6c20310150398eaafac10d2c466c81ad42b9fb2ad33
|
|
BLAKE2b-256 checksum How to use checksums |
b18499de1de57659833a5168ef9ab00184f7349f0523638629a359e87010b3e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / netflix_spectator_py-1.2.2-py3-none-any.whl
| Download URL | netflix_spectator_py-1.2.2-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06797eb4b0506a021b5255c912bf18f097187f9e7d2296cd82a42670fe62d9a1
|
|
BLAKE2b-256 checksum How to use checksums |
a55da323c03f4d08644a1aeecc0abb2e840ff58cc718b603a264a937f3c3c441
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for netflix-spectator-py 1.2.2
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.