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.io import VeselIO
from vesel.models import Version, Header, VeselFile

file = VeselFile(
    header=Header(
        version=Version(0, 1, 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.0.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.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vesel-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3206e7577e55b1909c1e4df5eeec4becfef6af198ff5707fe268d3b890986d8b
MD5 edcf432b906424c6907c3a0fc7aef16d
BLAKE2b-256 56e6a9455eb1f0d3367970da3368e335469057fc5a777b13d3116e2efa2bac4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vesel-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7886ccb219b8a16c8ede69088be6d32c321780b66e0b8bb97bfef074d537f67f
MD5 e9d54e947acf43e8193dabbb1244cc12
BLAKE2b-256 08d97a3eaea661b4d376dd899cdf4c4688db9b1be25a6aa5e1c09f3f069e107d

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