{"id":25409294,"url":"https://github.com/vizonex/heapstruct","last_synced_at":"2026-04-29T01:32:37.043Z","repository":{"id":276686504,"uuid":"929970948","full_name":"Vizonex/HeapStruct","owner":"Vizonex","description":"A Msgspec inspired dataclass library Made for CPython, Python and Cython forked from quickle","archived":false,"fork":false,"pushed_at":"2025-03-22T21:43:57.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T21:56:27.248Z","etag":null,"topics":["cpython","cython","dataclasses","python3"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vizonex.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-09T20:13:50.000Z","updated_at":"2025-03-22T21:56:02.000Z","dependencies_parsed_at":"2025-02-09T21:26:06.685Z","dependency_job_id":"72c1df01-ce63-48b7-acdd-5684efbd0010","html_url":"https://github.com/Vizonex/HeapStruct","commit_stats":null,"previous_names":["vizonex/heapstruct"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Vizonex/HeapStruct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2FHeapStruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2FHeapStruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2FHeapStruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2FHeapStruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vizonex","download_url":"https://codeload.github.com/Vizonex/HeapStruct/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizonex%2FHeapStruct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32407164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cpython","cython","dataclasses","python3"],"created_at":"2025-02-16T08:27:35.899Z","updated_at":"2026-04-29T01:32:37.028Z","avatar_url":"https://github.com/Vizonex.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HeapStruct \r\n\r\nA Forked Version of Quickle But it's just the Structure's boilerplate code to making a dataclass type object.\r\nThis Class Object is currently being utilized to research into ways that we could theoretically inject a \r\nBaseModel dataclass into a Cython cdef extension or Rust (PyO3) as well as Making a fully compatable subclass that can work \r\nwith SQLAlchemy Directly. \r\n\r\n```\r\npip install \"git+https://github.com/Vizonex/HeapStruct\"\r\n```\r\nThis is not a pypi library yet so git is currently required unless you want to download it as a zip and the run `setup.py`\r\n\r\n\r\n## Why I forked the library\r\n- Maintenance started to slow down for the msgspec branch.\r\n- To Research, Hack and Stress Test Everything. \r\nThe more I use it, the more mature it becomes.\r\n- making a Fully Cython Compatable Version of Quickle \u0026 Msgspec allowing for extra customization or writing your own encoder libraries.\r\n- To make the metaclass portion modifiable via subclassing it.\r\n- Researching ways to make valid C Extension Metaclasses for python (This has been a long-time issue with Cython itself...)\r\n- When it can't be made yourself, fork it.\r\n\r\n## Currently Planned\r\n- [x] Cython Module (pxd) `__init__.cython-3.0.pxd` \u0026 `c_heapstruct.pxd` backends\r\n- [ ] Testing Cython extension classes to see if cdef-classes will behave appropreately if compiled\r\n\r\n- [ ] `DictHeapMeta` a subclass of `HeapStructMeta` that allows for `__dict__` attributes (This is the key feature required for SQLAlchemy to work). This will need to be written in C alongside the already avalible `HeapstructMeta` Object \r\n\r\n- [ ] Cwpack Cython Extension for Decoding and Encoding HeapStructs since it's considered to be the fastest msgpack library.\r\n\r\n- [ ] Making `Field` Objects in the CPython Code.\r\n\r\n- [ ] Benchmarking against `Pydantic` and `SQLModel`\r\n\r\n- [ ] adding validators but those features will be coming at the very very end, it will likely be the last feature I get around to adding...\r\n\r\n- [ ] adding a `__post__` or `__post_new__` function which was [an idea for extending `__new__` function](https://discuss.python.org/t/add-a-post-method-equivalent-to-the-new-method-but-called-after-init/5449), this would in fact be simillar to how cython's `__cinit__` works where after the object is made, start setting class variables and is triggered right before `__init_subclasss__` is called.\r\n\r\n- [ ] Finding ways and ideas for reataining SqlAlchemy Columns whenever  `__init__` is not used with a Decoder. (This is currently been a reoccuring issue with the [SQLTable Library](https://github.com/Vizonex/SQLTable))\r\n\r\n- [ ] Catching up with the msgspec branch by typechecking ClassVars, Quickle doesn't have these features...\r\n\r\n## Changes made from Quickle / Msgspec\r\n- Made Struct's Metaclass Importable in order to try and stress-test everything and extend the limits of what was possible before.\r\n- Renamed to Heap Named after CPython's `PyHeapObjectType`\r\n- `__init_subclass__` is not used allowing the programmer/developer to utilize it fully. Instead we will use Mixins. Reason for doing so is to make a friendly SQLAlchemy branch.\r\n- `__post__` or `__post_new__` feature that I'm planning to fully implement.\r\n- If I have to go as far as what numpy does with the Cython Compiler, I will, I am exteremely relentless.\r\n- We're more focused on providing compatability to third party libraries.\r\n- Future Field Implementations are going to be subclassable, strict as msgspec but subclassable or we will provide ways for adding custom attributes...\r\n\r\n\r\n## Current Reasons why Pydantic is slow compared to this branch\r\n- They haven't figured out a way to make a metaclass in Rust PyO3 yet ,if this was solved we would have comparable competition.\r\nBeing bound to python alone slows down everything and is their current bottle-kneck. I am researching on behalf of everybody\r\nhere and I encourage people to figure out this unsolved puzzle.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizonex%2Fheapstruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvizonex%2Fheapstruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizonex%2Fheapstruct/lists"}