Skip to main content

A lightweight binary file format for UTF-8 text.

Project description

VESEL

A tiny binary file format written in Python.

VESEL files store UTF-8 text data inside a custom binary container with magic number validation and versioning support.

This project was created to explore how file formats work under the hood by implementing one from scratch.

Features

  • Custom binary file format
  • Magic number validation
  • Version checking
  • UTF-8 text storage
  • Cross-platform file handling using pathlib
  • Simple and extensible format design

Quick Example

from vesel import VeselIO, Version, Header, VeselFile

file = VeselFile(
    header=Header(
        version=Version(0, 2, 0)
    ),
    payload=b"Hello World"
)

VeselIO.write(
    "hello.vesel",
    file
)

loaded = VeselIO.read(
    "hello.vesel"
)

print(
    loaded.payload.decode("utf-8")
)

Project Structure

vesel/
├── docs/
│   └── specifications.md
├── examples/
│   └── basic_usage.py
├── src/
│   └── vesel/
│       ├── __init__.py
│       ├── cli.py
│       ├── constants.py
│       ├── exceptions.py
│       ├── io.py
│       ├── models.py
│       └── utils.py
├── tests/
│   └── test_io.py
├── LICENSE
├── pyproject.toml
├── README.md
└── the-first.vesel

Directory Overview

Path Purpose
docs/ Technical documentation and format specifications
examples/ Example programs demonstrating Vesel usage
src/vesel/ Main package source code
tests/ Automated test suite
LICENSE Project license
pyproject.toml Package configuration and build settings
README.md Project overview and usage guide
the-first.vesel First Vesel file created during development

Core Modules

Module Responsibility
models.py Data structures (Version, Header, VeselFile)
io.py Serialization, deserialization, file reading and writing
constants.py Format-wide constants such as magic bytes
exceptions.py Custom Vesel exceptions
utils.py Shared helper functions
cli.py Command-line interface
__init__.py Public package exports

## Specification

The complete VESEL format specification can be found in:

```text
docs/specifications.md

Why?

Most developers interact with file formats every day:

  • ZIP
  • PNG
  • PDF
  • MP3

VESEL exists as a learning project to understand how binary formats are structured, parsed, and versioned.

Future Ideas

  • Metadata support
  • Multiple data sections
  • Compression
  • Encryption
  • Archive/container support
  • CLI tooling
  • Formal specification revisions

License

MIT License


"The first vessel is made."

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

vesel-0.2.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

vesel-0.2.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file vesel-0.2.1.tar.gz.

File metadata

  • Download URL: vesel-0.2.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for vesel-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3d6b09916039c525cf533415389fce480b52ede958b2de9d158f31fee796b45d
MD5 59340b88e4d434e32543f1eead61bee3
BLAKE2b-256 a0c22e5dbd3971d1f6a579a988b35995d64a3418059ab366487419e95ea1e5dd

See more details on using hashes here.

File details

Details for the file vesel-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: vesel-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for vesel-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 76abafa919e3bcc80bde72c72d4a6abafa09b61778713b9fa38f86ea1b68d1db
MD5 85a227ac3d69461af512c2978264d714
BLAKE2b-256 9d6279066ab3030d8a312223f2b94c1fc3b0878e1114adef5b7593c895d15795

See more details on using hashes here.

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