GithubHelp home page GithubHelp logo

salfiii / pyscgen-service Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 809 KB

A single page web app to create AVRO & Pydantic Schemas based on multiple JSON documents/strings. Just paste some JSON Strings as an array and watch the Schemas appear.

Python 77.94% HTML 3.39% CSS 2.55% TypeScript 15.95% Batchfile 0.17%
avro docker fastapi generator pydantic python react schema pyscgen

pyscgen-service's Introduction

Pyscgen-service

A single page web app to create AVRO & Pydantic Schemas based on multiple JSON documents/strings. Just paste some JSON Strings as an array and watch the Schemas appear.

The cool part is, that it also handles nullability based on the data provided and missing fields in the documents. To infer nullability, at leas two documents are needed.

The Schema creation is realized with the Python Package pyscgen

PLEASE NOTE:

  • The app is currently work in progress but is running fine on my end.
  • I´d love to publicly host a version as a showcase but sadly heroku canceled the free plan and I´m currently looking for cheap solution to do so.
  • I´m planing to publish a version to Dockerhub for a more convenient access and installation routine.

screenshot.PNG

Technologies used:

How to run the app locally

Docker

  1. Clone the template
    • git clone https://github.com/Salfiii/pyscgen-service.git
  2. (install poetry if you want to run it locally)
  3. Install Docker or use a remote machine if you have one
  4. Run the dockerfile (you can change "pyscgen-service" to whatever you like):
    • docker build -t pyscgen-service . && docker run -it -p 50001:80 pyscgen-service
    • If you want to remove the dockerfile after exiting the service automatically, add "--rm" before "-it"
    • You can change the port 50001 to whatever port you want to use on your host
  5. Open http://localhost:50001 in your browser and you should see the OpenAPI docs.

With and IDE

You need to have Python 3.10 (or newer), node.js + npm and poetry installed, so Docker is way easier.

  1. run the main.py to start the Python webservice
  2. change directory to the gui folder in your CMD/shell and run the command
    • cd gui
    • npm start
  3. Open http://localhost:3000 in your browser and you should see the GUI. to access the OpenAPI docs, use Port 8001.

pyscgen-service's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.