Skip to main content

simpleTFTPS

simpleTFTPS is a high-performance TFTP (Trivial File Transfer Protocol) server written in Rust, providing seamless integration for C++ and Python through native bindings. It allows developers to implement custom GET and PUT logic via simple callbacks.

Features

  • Core in Rust: Fast, safe, and concurrent TFTP engine.
  • Unified Build: Simple Makefile to build everything (Rust, C++, Python).
  • Easy Integration: Native bindings for C++ and Python.
  • Customizable: Simple callback system to handle file requests and uploads.
  • Multi-threaded: Handles multiple client requests simultaneously using Rust threads.
  • Modern Python Support: Compatible with Python 3.7+ (GIL-safe).

Prerequisites

  • Rust: Installation guide
  • C++ Compiler: GCC (G++) or Clang supporting C++17
  • Python: Python 3.7 or higher (for Python bindings)
  • Make: To use the simplified build system
  • libcurl: Required for integration tests

Quick Start

Build Everything

To build the Rust library, C++ examples, and Python extension:

make

Run All Tests

To run Rust unit tests, C++ integration tests, and Python integration tests:

make test

Clean Up

To remove all build artifacts:

make clean

Usage

C++

Include the header and link against the Rust static library. Use the run() function with your callbacks.

#include "simpletftps.hpp"

extern "C" char* my_get_callback(const char* file) {
    return strdup("Data content");
}

int main() {
    run(my_get_callback, nullptr, "127.0.0.1:6969");
    return 0;
}

Python

Import the module and run the server in a thread (as run is blocking).

import simpleTFTPS
import threading

def cb_get(file):
    return "File content"

def cb_put(file):
    return False

threading.Thread(target=simpleTFTPS.run, args=("127.0.0.1:9001", cb_get, cb_put), daemon=True).start()

Project Structure

  • simpleTFTPS/: Rust implementation of the TFTP engine.
  • include/: C++ header and Python binding implementation.
  • tests/: Integration tests for C++, Python, and Rust.
  • Makefile: Unified build system.

License

This project is licensed under the MIT License.

Metadata

Release files for simpleTFTPS 1.1.0

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

Source distribution (sdist)

Source distribution for simpleTFTPS 1.1.0
File Size Uploaded Provenance Actions
simpletftps-1.1.0.tar.gz 23.3 MB Without provenance Details for simpletftps-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simpleTFTPS 1.1.0
File Interpreter ABI Platform Actions
simpletftps-1.1.0-cp313-cp313-manylinux_2_39_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.39+ x86-64 Details for simpletftps-1.1.0-cp313-cp313-manylinux_2_39_x86_64.whl

Total release size: 24.8 MB

Release files / simpletftps-1.1.0.tar.gz

Download URL simpletftps-1.1.0.tar.gz
Size 23.3 MB
Tags Source
SHA-256 checksum
How to use checksums
cf3d31089c2470168a47211ea146b8e7ab3435fec39d1516215ab2c75572d3de
BLAKE2b-256 checksum
How to use checksums
21e726cb878437fd9140bd162d482dbd87b490129f09b4fbd1e364f709d5d28e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / simpletftps-1.1.0-cp313-cp313-manylinux_2_39_x86_64.whl

Download URL simpletftps-1.1.0-cp313-cp313-manylinux_2_39_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
ff681df8c7026cd8cb0f44659e528cd3ead70de9a1eb1820bd42b3eea4e1a9a3
BLAKE2b-256 checksum
How to use checksums
827672b8e9c6839497ab6111182d70e6d4b3ca36dca1c7e49557568f4af4b7d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for simpleTFTPS 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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