genmon
datamodel-code-generator
genmon | datamodel-code-generator | |
---|---|---|
15 | 9 | |
347 | 2,315 | |
- | - | |
9.5 | 9.4 | |
4 days ago | 1 day ago | |
Python | Python | |
GNU General Public License v3.0 only | 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.
genmon
-
2023 May 22 Stickied -FAQ- & -HELPDESK- thread - Boot problems? Power supply problems? Display problems? Networking problems? Need ideas? Get help with these and other questions!
Hey all, I just installed three Unifi cameras around our property. I'd like to set up a few monitors around the home that show the RTSP streams in addition to my generator monitor dashboard (https://github.com/jgyates/genmon) as well as a little webpage that shows the state of our garage doors and driveway gate that I created with a couple Pico Ws (it's a _super basic_ HTML page that just refreshes every thirty seconds). I think I have the general structure pretty well mapped out in my head: three quadrants running VLC instances, plus one quadrant with two Chrome windows showing my simple status page and genmon. Planning to use a simple Python script to set up the windows on boot via xdotool, which then turns the streams and monitor on/off based on inputs from a PIO motion sensor. Might add a button to toggle through fullscreening the videos. Anyway, my question: can a Zero 2 W handle playing back three RTSP streams plus Chrome rendering two very simple sites? Given my experience with the Zero W, I think it wouldn't work. The 2 is pretty beefy, though, except for the limited RAM. I don't care too much; I'll find a use for them eventually anyway, and I can't find them in stock regardless (although they seem to be coming gradually back). What do you all think?
- Residential Brownout
-
Newest additions to my automated wifi connected home: I can see my heating oil tank level and my propane tank level remotely on my phone.
I run GenMon on a raspi out near my generator and my tank has a remote ready gauge. I'm working on having GenMon read the gauge directly via a hall effect sensor. GenMon publishes to MQTT and I integrate with Home Assistant that way. I'm not sure of your propane use case, but if it's for a generator, then this might be useful.
- Oil Pressure and Temperature Sensors - VOLTAGE not pressure - MAX 5VDC -
- Generac Guardian NON MoileLink compatible Gen Set Monitoring? How and what are you doing?
- We lost power today with a heat advisory and temps at 100F, this is what I learned.
-
How to test Generac generator?
if you good with tinkering with stuff you might use this to do a test idle runs: https://github.com/jgyates/genmon
- Monitoring 27kw Generac Generator with Raspberry Pi and Multimode Fiber
- How to measure direction of magnetic field? Trying to measure position of magnetic needle on propane gauge. Is there a way to accomplish this with a hall effect sensor?
- Hurricane Season is Upon Us - Running a UPS from generator power and GFCI Problems
datamodel-code-generator
- Datamodel-code-generator: Pydantic model/dataclass from OpenAPI, JSON, YAML
-
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
https://koxudaxi.github.io/datamodel-code-generator/
-
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.
[0] https://stoplight.io/
[1] https://koxudaxi.github.io/datamodel-code-generator/
[2] https://pyapi-server.readthedocs.io
[3] https://schemathesis.readthedocs.io
-
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
[0] https://github.com/koxudaxi/datamodel-code-generator
-
What's the best libraries to build a REST API with Openapi compatibility
To save you some work, if you have already an OpenAPI specification at hand, you can use datamodel-code-generator to generate your Pydantic models from the spec.
-
This is what I pushed today, I don't know why but I was very positive about the code until someone reviewed it and pointed out the obvious. Also 'internal_data' field is very essential for other parts of the code. It is so embarrassing I want to disappear from the face of the earth.
And there are code generators for it! https://github.com/koxudaxi/datamodel-code-generator/
What are some alternatives?
home-assistant-solaredge-modbus - Home assistant Component for reading data locally from Solaredge inverter through modbus TCP
sqlmodel - SQL databases in Python, designed for simplicity, compatibility, and robustness.
pymodbus - A full modbus protocol written in python
pydantic - Data validation using Python type hints
solaredge_modbus - SolarEdge Modbus data collection library
pydantic-factories - Simple and powerful mock data generation using pydantic or dataclasses
mercury-em - Get data from Mercury powermeter
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
Pyverilog - Python-based Hardware Design Processing Toolkit for Verilog HDL