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.
- Clone the template
git clone https://github.com/Salfiii/pyscgen-service.git
- (install poetry if you want to run it locally)
- Install Docker or use a remote machine if you have one
- 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
- Open http://localhost:50001 in your browser and you should see the OpenAPI docs.
You need to have Python 3.10 (or newer), node.js + npm and poetry installed, so Docker is way easier.
- run the main.py to start the Python webservice
- change directory to the gui folder in your CMD/shell and run the command
cd gui
npm start
- Open http://localhost:3000 in your browser and you should see the GUI. to access the OpenAPI docs, use Port 8001.