ntplib
Python NTP library
Decision gist · record as of 2026-08-14
Yes, if you need a lightweight, dependency-free NTP client for Python. The low install friction and permissive license make it straightforward to add. However, be aware that maintenance is dormant—the last release was in 2021 and the repository has not been updated since April 2024. If you require active support or compatibility guarantees with the latest Python versions, verify that the package works in your environment first.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies beyond Python's standard library.
- Maintenance is dormant—last release was in 2021 and the repository has not been updated since April 2024, though it remains unarchived and receives occasional attention.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2021-05-28 (1904 days) · last repo commit 2024-04-07 · 82 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,297,087 downloads/mo, #4,092 on PyPI
Alternatives
Verify before relying
import ntplib
from time import ctime
c = ntplib.NTPClient()
response = c.request('pool.ntp.org', version=3)
print(response.offset)
print(ctime(response.tx_time))
print(ntplib.leap_to_text(response.leap))- Whether the package works reliably with modern Python versions beyond 3.9, given the last release was in 2021.
- Current compatibility with contemporary NTP server implementations and protocol changes since 2021.
What it is and what it does
ntplib is a pure-Python NTP (Network Time Protocol) client that queries NTP servers and retrieves time synchronization data. It provides a simple interface to request time information from any NTP server and includes utility functions to decode NTP protocol fields—such as leap indicators, reference IDs, and mode values—into human-readable text. Because it depends only on Python's standard library, it runs on any platform with a Python interpreter.
The package is typically used to fetch accurate network time, calculate clock offset, or verify time synchronization in applications that need to know the precise time or detect clock drift. It returns structured response objects containing offset, delay, version, and other NTP metrics that applications can use directly or for logging and diagnostics.
Use it for
- Fetch current network time and clock offset to synchronize or verify system time in applications.
- Detect and measure clock drift by querying multiple NTP servers and comparing their responses.
- Log or display NTP diagnostic information (leap warnings, reference IDs, root delay) for time-sensitive systems.
- Validate that a system's clock is synchronized within acceptable bounds before running time-critical operations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a lightweight, dependency-free NTP client for Python.
The low install friction and permissive license make it straightforward to add. However, be aware that maintenance is dormant—the last release was in 2021 and the repository has not been updated since April 2024. If you require active support or compatibility guarantees with the latest Python versions, verify that the package works in your environment first.
Install
ntplib on PyPI
Before you install
Low install friction with no runtime dependencies beyond Python's standard library. Maintenance is dormant—last release was in 2021 and the repository has not been updated since April 2024, though it remains unarchived and receives occasional attention.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
import ntplib
from time import ctime
c = ntplib.NTPClient()
response = c.request('pool.ntp.org', version=3)
print(response.offset)
print(ctime(response.tx_time))
print(ntplib.leap_to_text(response.leap))
Verify before relying
- Whether the package works reliably with modern Python versions beyond 3.9, given the last release was in 2021.
- Current compatibility with contemporary NTP server implementations and protocol changes since 2021.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,904 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,297,087 / month, #4,092 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Networking :: Time Synchronization |
Evidence: ntplib-0.4.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ntp client library python”
- ntplibQuery NTP servers to retrieve network time synchronization data and…
- pybatfishPybatfish is a Python client for Batfish, a network validation tool…
- paypalhttpPayPalHttp is a generic HTTP client library designed to work with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also strict-rfc3339 · aniso8601 · zhdate · tonyg-rfc3339 · astropy-iers-data · korean-lunar-calendar · lunardate · pylutron-caseta · rfc3339-validator · timelib