Skip to main content

Introduction

Documentation Status Discord Build Status Code Style: Ruff

Network Time Protocol (NTP) helper for CircuitPython.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-ntp

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ntp

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ntp

Usage Example

import adafruit_connection_manager
import adafruit_ntp
import os
import time
import wifi

wifi_ssid = os.getenv("CIRCUITPY_WIFI_SSID")
wifi_password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
wifi.radio.connect(wifi_ssid, wifi_password)

pool = adafruit_connection_manager.get_radio_socketpool(wifi.radio)
ntp = adafruit_ntp.NTP(pool, tz_offset=0, cache_seconds=3600)

while True:
    print(ntp.datetime)
    time.sleep(1)

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Metadata

Release files for adafruit-circuitpython-ntp 3.4.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 adafruit-circuitpython-ntp 3.4.1
File Size Uploaded Provenance Actions
adafruit_circuitpython_ntp-3.4.1.tar.gz 35.4 kB Without provenance Details for adafruit_circuitpython_ntp-3.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for adafruit-circuitpython-ntp 3.4.1
File Interpreter ABI Platform Actions
adafruit_circuitpython_ntp-3.4.1-py3-none-any.whl Python 3 none any Details for adafruit_circuitpython_ntp-3.4.1-py3-none-any.whl

Total release size: 42.2 kB

Release files / adafruit_circuitpython_ntp-3.4.1.tar.gz

Download URL adafruit_circuitpython_ntp-3.4.1.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a81461d8a2bece5a904d8dfbb4a48c1b9536fc471f67f0e409b990733f454721
BLAKE2b-256 checksum
How to use checksums
eb3ad42c3b9f04f0e6264709c721706bb91cb3ee0311c2da03e86a71f7ebf36e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / adafruit_circuitpython_ntp-3.4.1-py3-none-any.whl

Download URL adafruit_circuitpython_ntp-3.4.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67e81123fe0b11cbcafc236713eed3b5013746caf40c7af7fce1903b2c63ab6d
BLAKE2b-256 checksum
How to use checksums
57b7af0bc7c32e4e97030f0e24ffe3b16d147f9ddeeebccb62b42bed5cc7bd72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for adafruit-circuitpython-ntp 3.4.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.4.1 This release

2 release files No provenance

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