skillfed

uptime

Cross-platform uptime library

uptime v3.0.1 373.9K downloads/30d#7,153 on PyPI33
Permissive license UNKNOWN DORMANT released

What it is and what it does

Uptime is a lightweight library that retrieves how long the system has been running since its last boot. It provides both a Python API (the `uptime()` function) and a command-line interface, making it useful for monitoring, logging, or scripting tasks that need to know system uptime. The package is cross-platform in intent, with classifiers for Linux, macOS, Windows, BSD, Solaris, and other operating systems.

The library has no Python dependencies, but it relies on platform-specific system calls to fetch uptime data, which means behavior and reliability vary by OS. The package is dormant—last released in 2013, with minimal recent maintenance—so it may not work reliably on modern Python versions or newer operating systems without fixes.

Use it for:

  • Monitor system uptime in a Python script or monitoring dashboard to track system stability.
  • Log uptime at application startup for diagnostics or audit trails.
  • Build a cross-platform system health check that includes uptime as one metric.
  • Automated testing or CI/CD pipelines that need to verify system state before running tests.
  • Command-line tool to quickly check when the system was last booted.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Retrieves the system uptime (time since last boot) in a cross-platform way, usable as a library function or command-line tool.

Yes, if you need a simple uptime query on a supported platform and can tolerate dormant maintenance. No, if you require active support or compatibility with modern Python 3 versions—test thoroughly on your target OS first. The lack of recent updates and unclear current license status make it risky for production use without verification.

Install

uptime on PyPI

pip

pip install uptime

uv

uv add uptime

poetry

poetry add uptime

Installing uptime

Before you install

High install friction due to platform-specific system calls required; package is dormant (last release 2013-10-07, last commit 2024-06-10) with no runtime dependencies, so maintenance burden is minimal but updates are infrequent.

License in practice

Licensed under BSD (permissive), so commercial and private use are unrestricted; however, license_raw is marked UNKNOWN, so verify the actual license text in the repository before relying on it in a commercial context.

Quickstart

pip install uptime

from uptime import uptime
print(uptime())

# Or from command line:
python -m uptime

Requires platform-specific system calls to retrieve uptime; behavior and availability vary significantly across operating systems (Linux, macOS, Windows, BSD, Solaris, BeOS).

Verify before relying

  • Whether the package actually works on all advertised platforms (BeOS, SunOS/Solaris) given its dormant maintenance status.
  • Current Python version compatibility—description says 2.5+, but Python 2 is long deprecated; unclear if it works on modern Python 3 versions.
  • Why install_friction is marked 'high' when there are zero runtime dependencies—likely due to compiled/system-level dependencies not captured in the metadata.

Package facts

License UNKNOWN (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 4,694 days since the last release
Last repo commit
First released
Downloads 373,889/month — #7,153 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: uptime-3.0.1.tar.gz

Development Status :: 5 - Production/StableIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: BeOSOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: Microsoft :: Windows :: Windows 95/98/2000Operating System :: Other OSOperating System :: POSIX :: BSDOperating System :: POSIX :: LinuxOperating System :: POSIX :: OtherOperating System :: POSIX :: SunOS/SolarisProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: System

Tags

system uptime libraryget system boot timecross-platform uptimepython uptime moduletime since last rebootsystem uptime commandboot time checker
system-monitoringcross-platform

More System packages