falkben / json-to-pydantic

json-to-pydantic
https://falkben.github.io/json-to-pydantic/
MIT License
11 stars 3 forks source link

Can we provide the page as official app? #1

Open koxudaxi opened 1 year ago

koxudaxi commented 1 year ago

@falkben Thank you for creating the app. I'm the author of the datamodel-code-generator I wanted to run datamodel-code-generator with pyscript. But, I met dependency problems. I checked your repository. you have resolved the problems.

I have some questions.

If you have any plans for the project then could you please tell me?

falkben commented 1 year ago

Wow, you found this fast! I'm glad you like it!

I'd love to work together. I have no big future plans for this, aside from doing a little cleanup.

I don't know if you've seen this, but @brokenloop created https://github.com/brokenloop/jsontopydantic. I need to update this project's README.md and the deployed page to make that more clear. The way that page works is it sends the JSON input to a server, which I wanted to avoid, thus the pyscript implementation.

The only thing I really added was the pyscript deployment.

Regarding getting the dependencies working in pyscript/pyodide, datamodel-code-generator requires a lot of them. Some of which are difficult to compile to webm. I found that for a simple JSON -> pydantic converter, only a few were actually needed. My solution was to install datamodel-code-generator using micropip with the option to avoid installing any dependencies. Any additional features (e.g. yaml) likely will require more dependencies, but we can figure out how to solve those as needed.

koxudaxi commented 1 year ago

Wow, you found this fast! I'm glad you like it!

Recently, GitHub tell me about the project's user and use case on the project's top page. 😄

Screenshot 2023-01-24 at 14 06 39

The way that page works is it sends the JSON input to a server, which I wanted to avoid, thus the pyscript implementation.

I knew the project and had stared the project ⭐ . I agree with you . I wanted to create the page by pyscript when I know pyscript last year.

My solution was to install datamodel-code-generator using micropip with the option to avoid installing any dependencies.

It's great 👍 I didn't know the solution.

I'd love to work together. I have no big future plans for this, aside from doing a little cleanup.

OK, What should we do? If you have the time to do tasks for the project, then I prefer to collaborate with you. Because I have a bunch of tasks for datamodel-code-generator and other OSS projects 😅 https://github.com/koxudaxi/datamodel-code-generator/issues/1042

We should decide task for the project as a start point.