Puslib
Puslib is a Python library for working with the ECSS Packet Utilization Standard (PUS), a protocol widely used in the space industry.
PUS defines an application-level interface between ground and space, covering both segments. It specifies a binary packet format for telecommands and telemetry (based on CCSDS space packets) and a routing mechanism for those packets, as well as a software architecture built around application processes and a set of standard services.
Puslib covers two main use cases:
- TM/TC packet parsing — deserialize raw packet streams, inspect packet fields, and extract parameter data for post-processing or analysis.
- PUS application stack — implement a PUS-compliant backend that receives telecommands and emits telemetry, for use in EGSE equipment, simulators, or any system that communicates over TM/TC.
The PUS stack is designed from the perspective of the system being monitored and controlled. It receives telecommands and produces telemetry, making it better suited for simulators and EGSE than for mission control systems. It targets ground tooling and test equipment rather than flight software, but don't let the sky be the limit.
Install
pip install puslib
Python 3.10 or later is required.
Basic Example
from datetime import datetime
from functools import partial
from puslib import packet
from puslib import time
MyTmPacket = partial(packet.PusTmPacket.deserialize,
has_type_counter_field=False,
has_destination_field=False)
MyCucTime = partial(time.CucTime, 4, 2, has_preamble=False)
with open('telemetry.dump', 'rb') as f:
content = f.read()
data = memoryview(content)
offset = 0
cuc_time = MyCucTime()
while offset < len(data):
packet_length, packet = MyTmPacket(data[offset:],
cuc_time,
validate_fields=False,
validate_pec=False)
offset += packet_length
if packet.service == 3 and packet.subservice == 25:
print(packet)
Supported Features
- CCSDS packet handling (telecommands and telemetry packets)
- CCSDS Unsegmented Time Code (CUC) support
- Policy handling of mission specific or implementation specific configurations
- Simple abstraction of application processes
- Streams for telemetry and telecommand I/O access
- PUS Services:
- PUS 1: Request Verification
- PUS 3: Housekeeping (partial support)
- PUS 5: Event Reporting
- PUS 8: Function Management
- PUS 17: Test (partial support)
- PUS 20: On-board Parameter Management (partial support)
Links
Metadata
Release files for puslib 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| puslib-0.4.0.tar.gz | 32.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| puslib-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.8 kB
Release files / puslib-0.4.0.tar.gz
| Download URL | puslib-0.4.0.tar.gz |
|---|---|
| Size | 32.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
505e68ccb3147968fb2b0f3802e9957624ce0ecfc2d688bc931ab3cdec2136a6
|
|
BLAKE2b-256 checksum How to use checksums |
459c6debd3a4bd93d74dd8acfc6e7873428a317be23e07429cc1a2a6eb509363
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / puslib-0.4.0-py3-none-any.whl
| Download URL | puslib-0.4.0-py3-none-any.whl |
|---|---|
| Size | 35.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f695f38ad4a07077f551c3f9bb28c1a0f1d2a30cd252cbc4ad8e4b229ca0218
|
|
BLAKE2b-256 checksum How to use checksums |
731eff7ab76618d06fe81a12f38451a760bd59425c1bf9d6610380c3c50bd51a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|