garph
datamodel-code-generator
garph | datamodel-code-generator | |
---|---|---|
27 | 9 | |
1,290 | 2,324 | |
1.0% | - | |
7.4 | 9.4 | |
2 months ago | 5 days ago | |
TypeScript | Python | |
MIT License | 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.
garph
-
Best backend for GQL?
https://garph.dev is pretty good. I have been using it for two months and love the experience. I had started out with nexus and briefly also evaluted pothos but switched to garph because the dev experience was superior. It takes full advantage of the structural type system of typescript rather than frameworks that lean more towards java style idioms.
-
Ask HN: Who wants to be hired? (December 2023)
Location: EU, Germany
Remote: Yes
Willing to relocate: Yes
Technologies: HTML, CSS, TailwindCSS, JavaScript, TypeScript, Node.js, React/Next.js, Vue/Nuxt, GraphQL, REST, Postgres, Git, AWS, Docker + K8s
GitHub: https://github.com/mishushakov
LinkedIn: https://linkedin.com/in/mishushakov
Email: hey at mish.co
Most recently, I worked at Step CI a Technical Founder and authored the API-Testing Framework (https://stepci.com) and Garph (https://garph.dev), a full-stack API-Framework, which brings the developer-experience of tRPC to GraphQL.
My passion is in making tools developers love using and make them more productive.
-
tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy
If you want something like tRPC but for GraphQL, you should definitely give Garph a try: https://garph.dev
-
I reviewed 1,000s of GraphQL vs. REST perspectives
Amazing findings! Really admire your effort here
Btw. If you're building a GraphQL API using TypeScript, you should take a look at garph (https://garph.dev) which helps you to create type-safe GraphQL APIs without code-gen
-
Next.js and GraphQL: The Perfect Combination for Full Stack Development
The next step is undoubtedly the creation of our GraphQL Schema using Garph to create a totally type-safe API without needing to do codegen.
- Garph - Fullstack Open-source GraphQL framework for TypeScript
- Garph - Fullstack Open-Source GraphQL framework for TypeScript
- Garph - Fullstack GraphQL framework for TypeScript
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?
zodios - typescript http client and server with zod validation
sqlmodel - SQL databases in Python, designed for simplicity, compatibility, and robustness.
sonner - An opinionated toast component for React.
pydantic - Data validation using Python type hints
ts-reset - A 'CSS reset' for TypeScript, improving types for common JavaScript API's
pydantic-factories - Simple and powerful mock data generation using pydantic or dataclasses
nuxt-scheduler - Create scheduled jobs with human readable time settings
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
llm-client - LLMClient - JS/TS Use prompt signatures, Agents, Reasoning, Function calling, RAG and more. Based on the Stanford DSP Paper
odmantic - Sync and Async ODM (Object Document Mapper) for MongoDB based on python type hints
suspense - Utilities for working with React Suspense
cattrs - Composable custom class converters for attrs.