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/`.
Raw data
{
"_id": null,
"home_page": "https://github.com/cf-natali/ntplib",
"name": "ntplib",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Charles-Francois Natali",
"author_email": "cf.natali@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b4/14/6b018fb602602d9f6cc7485cbad7c1be3a85d25cea18c233854f05284aed/ntplib-0.4.0.tar.gz",
"platform": "",
"description": "\nntplib - Python NTP library\n===========================\n\nDescription\n-----------\n\nThis module offers a simple interface to query NTP servers from Python.\n\nIt also provides utility functions to translate NTP fields values to text (mode,\nleap indicator...). Since it's pure Python, and only depends on core modules, it\nshould work on any platform with a Python implementation.\n\nExample\n-------\n\n>>> import ntplib\n>>> from time import ctime\n>>> c = ntplib.NTPClient()\n>>> response = c.request('europe.pool.ntp.org', version=3)\n>>> response.offset\n-0.143156766891\n>>> response.version\n3\n>>> ctime(response.tx_time)\n'Sun May 17 09:32:48 2009'\n>>> ntplib.leap_to_text(response.leap)\n'no warning'\n>>> response.root_delay\n0.0046844482421875\n>>> ntplib.ref_id_to_text(response.ref_id)\n193.190.230.66\n\n\nInstallation\n------------\n\nAs root::\n\n # python setup.py install\n\nor just copy ntplib.py inside a directory in your sys.path, e.g.\n`/usr/lib/python2.5/`.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python NTP library",
"version": "0.4.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "6027ba9a42b13a7f8579574918e25eea",
"sha256": "8d27375329ed7ff38755f7b6d4658b28edc147cadf40338a63a0da8133469d60"
},
"downloads": -1,
"filename": "ntplib-0.4.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "6027ba9a42b13a7f8579574918e25eea",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6849,
"upload_time": "2021-05-28T19:08:53",
"upload_time_iso_8601": "2021-05-28T19:08:53.323707Z",
"url": "https://files.pythonhosted.org/packages/58/8c/41da70f6feaca807357206a376b6de2001b439c7f78f53473a914a6dbd1e/ntplib-0.4.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "4c2118f6ef0d8c2c8a4f53d6318b2245",
"sha256": "899d8fb5f8c2555213aea95efca02934c7343df6ace9d7628a5176b176906267"
},
"downloads": -1,
"filename": "ntplib-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "4c2118f6ef0d8c2c8a4f53d6318b2245",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7135,
"upload_time": "2021-05-28T19:08:54",
"upload_time_iso_8601": "2021-05-28T19:08:54.394369Z",
"url": "https://files.pythonhosted.org/packages/b4/14/6b018fb602602d9f6cc7485cbad7c1be3a85d25cea18c233854f05284aed/ntplib-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-05-28 19:08:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "cf-natali",
"github_project": "ntplib",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ntplib"
}