Skip to main content

PyPI PyPI PyPI PyPI

pynrfjprog

Python wrapper around the nrfjprog dynamic link libraries (DLL). Use of this API allows developers to program/debug nRF SOC and SIP devices from the interpreter, write simple scripts for a more efficient development work flow, or write automated test frameworks. It can also be used to create applications in Python (i.e. command-line tools).

Use-cases

Dependencies

Structure

pynrfjprog
  ├── pynrfjprog
  │     ├──__init__.py    # Package marker to make pynrfjprog a module. Also defines the version number
  │     ├── API.py        # (Deprecated; included only for backwards compatibility) Alias for LowLevel.py
  │     ├── APIError.py   # Wrapper for the error return codes of the DLL
  │     ├── Hex.py        # (Deprecated; included only for backwards compatibility) Hex parsing library
  │     ├── HighLevel.py  # (Deprecated; included only for backwards compatibility) Wrapper for the nrfjprog highlevel DLL
  │     ├── JLink.py      # (Deprecated; included only for backwards compatibility) Finds the JLinkARM DLL
  │     ├── LowLevel.py   # Wrapper for the nrfjprog DLL, previously API.py
  │     ├── MultiAPI.py   # Allow multiple devices (up to 128) to be programmed simultaneously with a LowLevel API
  │     ├── lib_armhf
  │     │   └── # armhf nrfjprog libraries
  │     ├── lib_x64
  │     │   └── # 64-bit nrfjprog libraries
  │     ├── lib_x86
  │     │   └── # 32-bit nrfjprog libraries
  │     ├── docs
  │     │   └── # Header files of the nrfjprog DLL to provide in-depth documentation of the functions that are wrapped
  │     └── examples
  │         └── # Example scripts to show off the different APIs
  ├── LICENSE
  ├── README.md
  ├── requirements.txt
  └── pyproject.toml

Getting started

To install the latest release from PyPI:

python -m pip install pynrfjprog

To install from source:

python -m pip install path_to_unzipped_pynrfjprog

Open the Python interpreter and connect nRF device to PC:

from pynrfjprog import LowLevel

with LowLevel.API('NRF52') as api:
    api.enum_emu_snr()
    api.connect_to_emu_without_snr()
    api.erase_all()
    api.write_u32(ADDRESS, DATA, IS_FLASH)
    api.disconnect_from_emu()

To work with multiple nRF devices at once:

import LowLevel

api = LowLevel.API('NRF52')
api.open()

api2 = LowLevel.API('NRF52')
api2.open()

api3 = LowLevel.API('NRF52')
api3.open()

api.close()
api2.close()
api3.close()

To program firmware into the devices:

from pynrfjprog import LowLevel

with LowLevel.API() as api:
    api.program_file(<hex_file>)

    # Optional
    api.verify_file(<hex_file>)

Contributing

Contributing is encouraged along with the following coding standards.

Metadata

Release files for pynrfjprog 10.24.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynrfjprog 10.24.2
File Size Uploaded
pynrfjprog-10.24.2.tar.gz 47.6 MB Details

Release files / pynrfjprog-10.24.2.tar.gz

Download URL pynrfjprog-10.24.2.tar.gz
Size 47.6 MB
Tags Source
SHA-256 checksum
How to use checksums
0ae6d69d1a1620208422b0eb750d565c6ed7d6ed9b484000c2af0b54c9dac60e
BLAKE2b-256 checksum
How to use checksums
60ab34a2229895f3e953a7207f85644f4db1618adacee9f1413816ef5c2af56f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

10.24.2 This release

1 release file

10.24.0

1 release file

10.23.5

1 release file

10.23.2

1 release file

10.23.1

1 release file

10.23.0

1 release file

10.19.0

1 release file

10.18.2

1 release file

10.18.1

1 release file

10.18.0

1 release file

10.17.3

1 release file

10.15.3

1 release file

10.15.2

1 release file

10.15.1

1 release file

10.15.0

1 release file

10.14.0

1 release file

10.12.2

1 release file

10.12.1

1 release file

10.12.0

1 release file

10.10.0

1 release file

10.9.0

1 release file

10.8.0

1 release file

10.7.0

1 release file

10.6.0

1 release file

10.5.0

1 release file

10.4.1

1 release file

10.4.0

1 release file

10.3.0

1 release file

10.2.1

1 release file

10.1.2

1 release file

10.1.1

1 release file

9.8.1

1 release file

9.8.0

1 release file

9.7.3

1 release file

9.7.2

1 release file

9.7.1

1 release file

9.7.0

1 release file

9.6.0

1 release file

9.5.0

1 release file

9.4.0

1 release file

9.3.1

1 release file

9.2.1

1 release file

9.2.0

1 release file

9.1.0

1 release file

9.0.0

1 release file

8.5.0

1 release file

8.4.0

1 release file

8.3.0

1 release file

8.2.0

1 release file

8.1.0

1 release file

8.0.0

1 release file

7.7.0

1 release file

7.6.0

1 release file

7.5.2

1 release file

7.5.1

1 release file

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