Metadata-Version: 2.4
Name: cfdp-py
Version: 0.6.0
Summary: Library for high level CCSDS File Delivery Protocol (CFDP) components
Project-URL: Homepage, https://github.com/us-irs/cfdp-py
Author-email: Robin Mueller <robin.mueller.m@pm.me>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ccsds,communication,file-transfer,packet,space
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: deprecation~=2.1
Requires-Dist: fastcrc~=0.3
Requires-Dist: spacepackets<0.32,>=0.30
Provides-Extra: lint
Requires-Dist: ruff; extra == 'lint'
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'
Requires-Dist: pyfakefs~=5.2; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

[![ci](https://github.com/us-irs/cfdp-py/actions/workflows/ci.yml/badge.svg)](https://github.com/us-irs/cfdp-py/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/cfdp-py/badge/?version=latest)](https://cfdp-py.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/us-irs/cfdp-py/graph/badge.svg?token=FBL1NR54BI)](https://codecov.io/gh/us-irs/cfdp-py)
[![PyPI version](https://badge.fury.io/py/cfdp-py.svg)](https://badge.fury.io/py/cfdp-py)

cfdp-py - High level Python library for CFDP components
======================

The `cfdp-py` library offers some high-level CCSDS File Delivery Protocol (CFDP) components to
perform file transfers according to the [CCSDS Blue Book 727.0-B-5](https://public.ccsds.org/Pubs/727x0b5.pdf).
The underlying base packet library used to generate the packets to be sent is the
[spacepackets](https://github.com/us-irs/spacepackets-py) library.

# Features

This library supports the following features:

- Unacknowledged (class 1) file transfers for both the sending and destination side
- Acknowledged (class 2) file transfers for both the sending and destination side

The following features have not been implemented yet. PRs or notifications for demand are welcome!

- Suspending transfers
- Inactivity handling
- Start and end of transmission and reception opportunity handling
- Keep Alive and Prompt PDU handling

# Install

You can install this package from PyPI

For example, using [`uv`](https://docs.astral.sh/uv/)

Setting up virtual environment:

```sh
uv venv
```

Regular install:

```sh
uv pip install -e .
```

Interactive install with testing support:

```sh
uv pip install -e ".[test]"
```

# Examples

You can find all examples [inside the documentation](https://cfdp-py.readthedocs.io/en/latest/examples.html)
and the `examples` directory of this repository.

# Tests

If you want to run the tests, it is recommended to install `pytest` and `coverage` (optional)
first. You also have to install the package with the optional `test` feature:

```sh
uv pip install -e ".[test]"
```

Running tests regularly:

```sh
pytest
```

Running tests with coverage:

```sh
coverage run -m pytest
```

# Documentation

The documentation is built with Sphinx

Install the required dependencies first:

```sh
pip install -r docs/requirements.txt
```

Then the documentation can be built with

```sh
cd docs
make html
```

You can run the doctests with

```sh
make doctest
```

# Formatting and Linting

Linting:

```sh
ruff check
```

Formatting:

```sh
ruff format
```
