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, 2)
),
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
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vesel-0.2.2.tar.gz.
File metadata
- Download URL: vesel-0.2.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad8a05b6c5e6ae58755346da8d5c3fd3ebcf0aacce003d9e5c30f6fe54f16e18
|
|
| MD5 |
7d09dd78eca35c73de516c5d93622035
|
|
| BLAKE2b-256 |
443c21dfe864e076484964cc28c30b2ac69052dba42da37bdc2315df64522693
|
File details
Details for the file vesel-0.2.2-py3-none-any.whl.
File metadata
- Download URL: vesel-0.2.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a72d4ae5b6f5b8e4410139f5fae1f4bba50e77440eb3abd62b2c5be4df5eaf8e
|
|
| MD5 |
cd5e195516f572e36b4153da30f58b05
|
|
| BLAKE2b-256 |
46a9e3ed78ae53a5dafc034fadc33e735cb21242b52fd87c205c65d43c11b86b
|