Skip to main content

minimalistic implementation of the Space Packet specification from the CCSDS Space Packet Protocol standard

Project description

minsp

Minimalistic implementation of the Space Packet specification from the CCSDS Space Packet Protocol standard.

Repository | Documentation

Installation

Install package from the git repository:

$ pip install git+https://github.com/nunorc/minsp@master

Quick Start

Import the SpacePacket class from the package:

>>> from minsp import SpacePacket

For example, to create a new space packet for APID 11 and an arbitrary payload:

>>> space_packet = SpacePacket(apid=11, payload=b'hello')
>>> space_packet
SpacePacket(version=0b0, type=PacketType.TM, sec_hdr_flag=0b0, apid=11,
sequence_flags=0b11, sequence_count=0, data_length=4)

To get the bytes representation of the packet:

>>> byte_stream = space_packet.byte_stream()
>>> byte_stream
b'\x00\x0b\xc0\x00\x00\x04hello'

Packets can also be created from a byte stream:

>>> new_packet = SpacePacket.from_byte_stream(byte_stream)
>>> new_packet
SpacePacket(version=0b0, type=PacketType.TM, sec_hdr_flag=0b0, apid=11, sequence_flags=0b11, sequence_count=0, data_length=4)
>>> new_packet.payload
b'hello'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minsp-0.0.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minsp-0.0.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file minsp-0.0.1.tar.gz.

File metadata

  • Download URL: minsp-0.0.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for minsp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 81f2842261cf813c668a30fe3f26a8c4804d644a23f9936821176fb64975aa51
MD5 dbe2d56f6e47cb776c3ea32c2329d06c
BLAKE2b-256 878ae18f6e08566101d8b32641dff6277c35959301bb2b921ca682dc344f5d3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for minsp-0.0.1.tar.gz:

Publisher: python-release.yml on nunorc/minsp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file minsp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: minsp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for minsp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49e69f7b8c75358705a1fe0786a2a98f86214806b0c123e33da0a16694091ece
MD5 fb6c67742f23f436379aecdfed11fcca
BLAKE2b-256 185be025da9f604609d979a2faf100a15100eb0e66d9a3b6af2291af585a2985

See more details on using hashes here.

Provenance

The following attestation bundles were made for minsp-0.0.1-py3-none-any.whl:

Publisher: python-release.yml on nunorc/minsp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page