{"id":26932866,"url":"https://github.com/thetacom/byteclasses","last_synced_at":"2025-07-11T21:38:15.295Z","repository":{"id":233191897,"uuid":"785495580","full_name":"thetacom/byteclasses","owner":"thetacom","description":"A Python package to manage and interact with binary data in a simple and structured manner.","archived":false,"fork":false,"pushed_at":"2024-04-13T22:02:49.000Z","size":1544,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-14T13:07:54.548Z","etag":null,"topics":["binary-data","bytes","data","dataclasses","package","python","python3"],"latest_commit_sha":null,"homepage":"https://io.thetacom.info/byteclasses/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thetacom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-12T01:58:35.000Z","updated_at":"2024-04-17T02:38:41.374Z","dependencies_parsed_at":"2024-04-17T02:38:39.007Z","dependency_job_id":"84133199-94e8-4386-a9c8-233b55009e08","html_url":"https://github.com/thetacom/byteclasses","commit_stats":null,"previous_names":["thetacom/byteclasses"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetacom%2Fbyteclasses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetacom%2Fbyteclasses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetacom%2Fbyteclasses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetacom%2Fbyteclasses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thetacom","download_url":"https://codeload.github.com/thetacom/byteclasses/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246781124,"owners_count":20832749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-data","bytes","data","dataclasses","package","python","python3"],"created_at":"2025-04-02T08:28:58.233Z","updated_at":"2025-04-02T08:28:58.741Z","avatar_url":"https://github.com/thetacom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Byteclasses Python Package\n\n[![Version](https://img.shields.io/pypi/v/byteclasses.svg)](https://pypi.python.org/pypi/byteclasses)\n[![Status](https://img.shields.io/pypi/status/byteclasses)](https://pypi.python.org/pypi/byteclasses)\n[![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/byteclasses)](https://libraries.io/pypi/byteclasses)\n[![Wheel](https://img.shields.io/pypi/wheel/byteclasses)](https://pypi.org/project/byteclasses/)\n[![Downloads](https://img.shields.io/pypi/dm/byteclasses)](https://pypi.python.org/pypi/byteclasses)\n[![License](https://img.shields.io/pypi/l/byteclasses.svg)](https://pypi.python.org/pypi/byteclasses)\n[![Python Implementation](https://img.shields.io/pypi/implementation/byteclasses)](https://pypi.org/project/byteclasses/)\n[![Python Version](https://img.shields.io/pypi/pyversions/byteclasses)](https://pypi.org/project/byteclasses/)\n\n[![Lint](https://github.com/thetacom/byteclasses/actions/workflows/lint.yml/badge.svg)](https://github.com/thetacom/byteclasses/actions/)\n[![Test](https://github.com/thetacom/byteclasses/actions/workflows/test.yml/badge.svg)](https://github.com/thetacom/byteclasses/actions/)\n[![Release](https://github.com/thetacom/byteclasses/actions/workflows/release.yml/badge.svg)](https://github.com/thetacom/byteclasses/actions/)\n[![Publish](https://github.com/thetacom/byteclasses/actions/workflows/publish.yml/badge.svg)](https://github.com/thetacom/byteclasses/actions/)\n\n[![Pre-Commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)\n\n![Logo](docs/imgs/byteclasses.png)\n\nA python package designed to ease data manipulation tasks and improve efficiency when handling binary data.\n\n## Installation\n\n```console\n\u003e pip install byteclasses\n```\n\n## Description\n\nByteclasses provides a variety of convenience wrapper classes to simplify data handling. These wrapper classes automatically pack and unpack data values.\n\nAdditionally, certains types, such as byteclass integers, impose type specific constraints. For example, assigning the value 256 to a `UInt8` will raise an `OverflowError` exception.\n\nThis library contains a variety of fixed size primitive byteclasses. These primitive classes can be used in conjunction with the byteclass collections to build more complicated data elements.\n\nSimiliar to a Python `dataclass`, byteclass collections are constructured using the `structure` or `union` class decorators.\nWhereas dataclasses have fields, byteclass collections have members. Collection members must be a byteclass type and cannot have a default value unless using the `member` constructor function. Each member will be instantiated using its type hint as a factory.\n\nA byteclass structure and union behaves similar to a C struct and union respectively.\n\nThe `ByteArray` and `String` collections can be instantiated directly using the provided classes.\n\n## Byteclasses\n\n- Primitives\n  - Generic - `BitField`, `Byte`, `Word`,`DWord`, `QWord`\n  - Characters - `UChar` (`Char`), `SChar`\n  - Floats - `Float16` (`Half`), `Float32` (`Float`),`Float64` (`Double`)\n  - Integers - `Int8`, `UInt8`, `Int16` (`Short`), `UInt16` (`UShort`), `Int32` (`Int`), `UInt32` (`UInt`), `Long`, `ULong`, `Int64` (`LongLong`), `UInt64` (`ULongLong`)\n  - Special - `ByteEnum`\n\n- Collections\n  - `ByteArray` - Class\n  - `String` - Class\n  - `structure` - Class Decorator\n  - `union` - Class Decorator\n\n## Simple Byteclass Structure Example\n\n```python\nfrom byteclasses.types.collections import structure\nfrom byteclasses.types.primitives.integer import UInt8, UInt32\n\n@structure\nclass MyStruct:\n  \"\"\"My custom byteclass structure.\"\"\"\n\n  member1: UInt8\n  member2: UInt32\n\nmy_var = MyStruct()\n```\n\n## Docs\n\n[Byteclasses Documentation](https://io.thetacom.info/byteclasses/)\n\n## References\n\n[C data types](https://en.wikipedia.org/wiki/C_data_types)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetacom%2Fbyteclasses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthetacom%2Fbyteclasses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetacom%2Fbyteclasses/lists"}