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 using pip:

$ pip install minsp

Install package from the git repository:

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

Note: minsp depends on the bitstruct package that may require a C compiler to install.

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.2.tar.gz (15.1 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.2-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: minsp-0.0.2.tar.gz
  • Upload date:
  • Size: 15.1 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.2.tar.gz
Algorithm Hash digest
SHA256 f3c0e3b522b64f5c9ef4c22c895f14dd775b5c127428c36b17fe71de1917561b
MD5 aeb6d96668efbf2c6636c2d5d5643509
BLAKE2b-256 5f330117025aae538935258d7fcfdea3f21376866d778919f7b21c54273be0ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for minsp-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: minsp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 15.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e8c817b0693006122c55dad74118db8c2e27f605005977f9eeb6b95127777881
MD5 0d146c11c67be8956c844fc1856e2a8e
BLAKE2b-256 f33bf56532857882ea851b0c41d1341837f1d33a803f94711b0872dd4c51959b

See more details on using hashes here.

Provenance

The following attestation bundles were made for minsp-0.0.2-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