Skip to main content

nico579-commons

Shared building blocks for four small open-source apps: blink2video, lidar2map, watch2notif and gpxsolar.

Each of them grew its own copy of the same pieces: the system tray icon, the local web server, atomic file writes, the update check. Every fix had to be carried by hand into the other copies, and some were forgotten. This package gathers those pieces in one place, one module each, so that the four apps behave the same and a fix lands everywhere at once.

Modules

  • nico579_commons.tray: the tray icon, with the very same menu in all four apps: Open, "Update to x.y" only when a newer version is known, Restart, Stop, and "Create a Desktop shortcut". There is no room for app-specific entries on purpose: everything else lives in the page that Open brings up. The menu is rebuilt every five seconds, on the main thread under macOS; Restart, Stop and Update run off the icon's message loop, and the icon waits for them before returning.
  • nico579_commons.raccourci: a desktop shortcut in one call, as a .lnk on Windows, a small .app on macOS and a trusted .desktop file on Linux.
  • nico579_commons.maj: a light check for a newer GitHub release, asked at most once an hour by a background thread, so the tray menu and the page read the answer without waiting for the network.
  • nico579_commons.relance: what "Restart" needs. Under the app's own systemd user service, systemd itself restarts it, since a process spawned from inside the service would be killed along with it; elsewhere, a new detached process, in its own session so that launchd leaves it alone. hors_du_service() does the same for a second process that must outlive the app, such as lidar2map's "New instance": under the service, it starts in a scope of its own (systemd-run --user --scope).
  • nico579_commons.environnement: gives system programs (systemctl, xdg-open, the browser) the LD_LIBRARY_PATH they had before the PyInstaller bootloader prefixed it with the app's own libraries.

The inventory of what is shared, and where the work stands, lives in INVENTAIRE.md (in French).

Use

from nico579_commons import tray

actions = tray.Actions(ouvrir=open_page, redemarrer=restart, arreter=stop,
                       version_disponible=cached_newer_version,
                       mettre_a_jour=start_update,
                       creer_raccourci=create_desktop_shortcut,
                       langue=current_language)
tray.Tray("myapp", Path("assets/myapp.ico"), actions).executer()

Python 3.8 or later: blink2video still ships a Windows 7 build on 3.8.

License

GPL-3.0-or-later, like the four apps.

Metadata

Release files for nico579-commons 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nico579-commons 0.3.1
File Size Uploaded
nico579_commons-0.3.1.tar.gz 32.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nico579-commons 0.3.1
File Interpreter ABI Platform
nico579_commons-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 60.1 kB

Release files / nico579_commons-0.3.1.tar.gz

Download URL nico579_commons-0.3.1.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
16b98640c18d4bbc8c05bfa567aae4442a2d60fcbf17caa68d746edd649a3ede
BLAKE2b-256 checksum
How to use checksums
c6cdd83451963ad1567301a16cffb032dc7b51e05b6eae9fac499c3dda7a6505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / nico579_commons-0.3.1-py3-none-any.whl

Download URL nico579_commons-0.3.1-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f9aa29a09939484ceab9324c8cf518e8a199581c5b08c73a77f0f99cb0ffa6d
BLAKE2b-256 checksum
How to use checksums
2cd3d3a1b84304e59e842670ee9c1dd59cf23026cfcc0a81f1435395f3b7a48e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page