Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ntplib

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ntplib

Python NTP library

  • 0.4.0
  • PyPI
  • Socket score

Maintainers
1

ntplib - Python NTP library

Description

This module offers a simple interface to query NTP servers from Python.

It also provides utility functions to translate NTP fields values to text (mode, leap indicator...). Since it's pure Python, and only depends on core modules, it should work on any platform with a Python implementation.

Example

import ntplib from time import ctime c = ntplib.NTPClient() response = c.request('europe.pool.ntp.org', version=3) response.offset -0.143156766891 response.version 3 ctime(response.tx_time) 'Sun May 17 09:32:48 2009' ntplib.leap_to_text(response.leap) 'no warning' response.root_delay 0.0046844482421875 ntplib.ref_id_to_text(response.ref_id) 193.190.230.66

Installation

As root::

python setup.py install

or just copy ntplib.py inside a directory in your sys.path, e.g. /usr/lib/python2.5/.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc