Pyverilog
datamodel-code-generator
Our great sponsors
Pyverilog | datamodel-code-generator | |
---|---|---|
2 | 9 | |
565 | 2,221 | |
3.0% | - | |
0.0 | 9.4 | |
8 months ago | 7 days ago | |
Python | Python | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Pyverilog
-
Tools for designing hardware in Python
Any hardware designers here who use Python for designing hardware? There are a bunch of libraries that all seem promising MyHDL, PyRTL, PyVerilog, PyLog, PyMTL3, ... All seem to work roughly the same. Write code in Python and transpile it to VHDL/Verilog. Which of these are popular and well-maintained? MyHDL looks good but it's last release was 0.10 in 2018 and for hardware design you don't want to rely on 0.x software. Anything like Chisel for Python.
-
How to compare HDL simulation/implementation results to Matlab?
PyVerilog https://github.com/PyHDI/Pyverilog
datamodel-code-generator
-
tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy
Like generating pydantic models or dataclasses for an OpenAPI schema? I haven't needed to go in that direction myself, but this[0] looks promising!
Apologies if I've misunderstood your comment
-
OpenAPI v4 Proposal
I'm sorry, but you have completely misunderstood the purpose of Open API.
It is not a specification to define your business logic classes and objects -- either client or server side. Its goal is to define the interface of an API, and to provide a single source of truth that requests and responses can be validated against. It contains everything you need to know to make requests to an API; code generation is nice to have (and I use it myself, but mainly on the server side, for routing and validation), but not something required or expected from OpenAPI
For what it's worth, my personal preferred workflow to build an API is as follows:
1. Build the OpenAPI spec first. A smaller spec could easily be done by hand, but I prefer using a design tool like Stoplight [0]; it has the best Web-based OpenAPI (and JSON Schema) editor I have encountered, and integrates with git nearly flawlessly.
2. Use an automated tool to generate the API code implementation. Again, a static generation tool such as datamodel-code-generator [1] (which generates Pydantic models) would suffice, but for Python I prefer the dynamic request routing and validation provided by pyapi-server [2].
3. Finally, I use automated testing tools such as schemathesis [3] to test the implementation against the specification.
[1] https://koxudaxi.github.io/datamodel-code-generator/
-
Create Pydantic datamodel from huge JSON file with local datamodel-code-generator
The site also provide a link to the github repo of the underlying program.
-
PSA: I think this JSON to Pydantic converter is extremely useful for boilerplate model creation
Not sure who owns/hosts the site, but its based on this github repo.
-
My top python library
That's what datamodel-code-generator propose.
-
I use attrs instead of pydantic
had generally good experience creating typed wrappers for api's with json-schema-to-pydantic[0] converter
What are some alternatives?
sqlmodel - SQL databases in Python, designed for simplicity, compatibility, and robustness.
pydantic - Data validation using Python type hints
pyverilator - Python wrapper for verilator model
pydantic-factories - Simple and powerful mock data generation using pydantic or dataclasses
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
odmantic - Sync and Async ODM (Object Document Mapper) for MongoDB based on python type hints
cattrs - Composable custom class converters for attrs.
django-ninja - 💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
myhdl - The MyHDL development repository
PyRTL - A collection of classes providing simple hardware specification, simulation, tracing, and testing suitable for teaching and research. Simplicity, usability, clarity, and extendability rather than performance or optimization is the overarching goal.
pydantic-i18n - pydantic-i18n is an extension to support an i18n for the pydantic error messages.
nmigen - A refreshed Python toolbox for building complex digital hardware. See https://gitlab.com/nmigen/nmigen