Generate a backend and frontend stack using Python and json-ld, including interactive API documentation.

Related tags

Documentationd4
Overview

d4 - Base Project Generator

GitHub build PyLint GitHub Repo stars GitHub commit activity made-with-python GitHub top language https://github.com/cookiecutter/cookiecutter

Generate a backend and frontend stack using Python and json-ld, including interactive API documentation.

d4? What is d4 for?

d4 is a kind of template project for creating µServices based on python. These µServices collect existing data (e.g. inventory data from IT systems) and make this data available in a distributed way via standardised interfaces (REST-API) and in a standardised form (JSON-LD).

For this purpose, the µServices collect data from several Single Points of Truth (SPOTs) and offer possibilities to link the individual data sets (from different SPOTs) with each other. There is also a µService template that can be used to create a very simple SPOT with a web UI and CSV/Excel interface. This is used for data enrichment (distributed in several locations) that cannot be automatically read from systems. The templates produce µServices that are intended to enable the value-added consolidation of distributed data across organisational and departmental boundaries.

Some feature aspects:

  • µservices adapting and caching SPOTs
  • robust and fast, based on python, fastapi, docker
  • uses OpenAPI (formerly Swagger)
  • uses JSON-LD including schemas
  • a µService can enrich information from its "neighbourhood" itself
  • at a "psydocentral" location, a lot of data from µServices can be consolidated in a "big graph DB".
  • the template project evolved from various iterations to improve heterogeneous IT infrastructures with "data driven" aspects.

How to use it in a virtual python environment.

optionally create a virtual environment like

$ python3 -m venv ~/.virtualenvs/d4
$ source ~/.virtualenvs/d4/bin/activate[.fish|.csh]
$ pip --version
pip 21.2.4 from [...]/d4/lib/python3.10/site-packages/pip (python 3.10)

Go to the directory where you want to create your project and run:

$ pip install --upgrade pip
$ pip install -r requirements_dev.txt
# > cookiecutter https://github.com/mleist/cookiecutter-fastapi-json-ld
$ cookiecutter .
project_name [Base Project]:
project_slug [base-project]:

cookiecutter has created a project under base-project.

Now we start - without any further changes - the backend

$ cd base-project/backend/
$ uvicorn app.main:app --reload
INFO:     Will watch for changes in these directories: ['[...]/base-project/backend']
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [50623] using statreload
INFO:     Started server process [50625]
INFO:     Waiting for application startup.
INFO:     Application startup complete.

From here on, the generated µService runs.

$ curl http://127.0.0.1:8000
{"message":"Hello world! From FastAPI running on Uvicorn with Gunicorn. Using Python 3.10"}

More to read

There is documentation.

There is an introduction to the d4 basics.

What is the difference between introduction and documentation?

The introduction is for clarification of how d4 works, it is not included in the project cookiecutter will have created.

The documentation is part of the project and thus intended for later use in the generated project.

Owner
Markus Leist
Telecommunications Engineer, different equal // Dipl.-Ing. Nachrichtentechnik; Spielkind; anders gleich
Markus Leist
Plugins for MkDocs.

Plugins for MkDocs and Python Markdown pip install neoteroi-mkdocs This package includes the following plugins and extensions: Name Description Type m

35 Dec 23, 2022
Python Tool to Easily Generate Multiple Documents

Python Tool to Easily Generate Multiple Documents Running the script doesn't require internet Max Generation is set to 10k to avoid lagging/crashing R

2 Apr 27, 2022
Xanadu Quantum Codebook is an experimental, exercise-based introduction to quantum computing using PennyLane.

Xanadu Quantum Codebook The Xanadu Quantum Codebook is an experimental, exercise-based introduction to quantum computing using PennyLane. This reposit

Xanadu 43 Dec 09, 2022
Obmovies - A short guide on setting up the system and environment dependencies required for ob's Movies database

Obmovies - A short guide on setting up the system and environment dependencies required for ob's Movies database

1 Jan 04, 2022
Workbench to integrate pyoptools with freecad, that means basically optics ray tracing capabilities for FreeCAD.

freecad-pyoptools Workbench to integrate pyoptools with freecad, that means basically optics ray tracing capabilities for FreeCAD. Requirements It req

Combustión Ingenieros SAS 12 Nov 16, 2022
Service for visualisation of high dimensional for hydrosphere

hydro-visualization Service for visualization of high dimensional for hydrosphere DEPENDENCIES DEBUG_ENV = bool(os.getenv("DEBUG_ENV", False)) APP_POR

hydrosphere.io 1 Nov 12, 2021
An open-source script written in python just for fun

Owersite Owersite is an open-source script written in python just for fun. It do

大きなペニスを持つ少年 7 Sep 21, 2022
Tutorial for STARKs with supporting code in python

stark-anatomy STARK tutorial with supporting code in python Outline: introduction overview of STARKs basic tools -- algebra and polynomials FRI low de

121 Jan 03, 2023
Dynamic Resume Generator

Dynamic Resume Generator

Quinten Lisowe 15 May 19, 2022
Pyoccur - Python package to operate on occurrences (duplicates) of elements in lists

pyoccur Python Occurrence Operations on Lists About Package A simple python package with 3 functions has_dup() get_dup() remove_dup() Currently the du

Ahamed Musthafa 6 Jan 07, 2023
Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized

Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized; as this infor

Vibhav Kumar Dixit 2 Jul 18, 2022
the project for the most brutal and effective language learning technique

- "The project for the most brutal and effective language learning technique" (c) Alex Kay The langflow project was created especially for language le

Alexander Kaigorodov 7 Dec 26, 2021
A system for Python that generates static type annotations by collecting runtime types

MonkeyType MonkeyType collects runtime types of function arguments and return values, and can automatically generate stub files or even add draft type

Instagram 4.1k Jan 07, 2023
Assignments from Launch X's python introduction course

Launch X - On Boarding Assignments from Launch X's Python Introduction Course Explore the docs » Report Bug · Request Feature Table of Contents About

Javier Méndez 0 Mar 15, 2022
Data-science-on-gcp - Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017

data-science-on-gcp Source code accompanying book: Data Science on the Google Cloud Platform, 2nd Edition Valliappa Lakshmanan O'Reilly, Jan 2022 Bran

Google Cloud Platform 1.2k Dec 28, 2022
Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02

Mini-project report Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02 Introduction This project was

1 Nov 08, 2021
An open source utility for creating publication quality LaTex figures generated from OpenFOAM data files.

foamTEX An open source utility for creating publication quality LaTex figures generated from OpenFOAM data files. Explore the docs » Report Bug · Requ

1 Dec 19, 2021
Parser manager for parsing DOC, DOCX, PDF or HTML files

Parser manager Description Parser gets PDF, DOC, DOCX or HTML file via API and saves parsed data to the database. Implemented in Ruby 3.0.1 using Acti

Эдем 4 Dec 04, 2021
CoderByte | Practice, Tutorials & Interview Preparation Solutions|

CoderByte | Practice, Tutorials & Interview Preparation Solutions This repository consists of solutions to CoderByte practice, tutorials, and intervie

Eda AYDIN 6 Aug 09, 2022
Elliptic curve cryptography (ed25519) beginner tutorials in Python 3

ed25519_tutorials Elliptic curve cryptography (ed25519) beginner tutorials in Python 3 Instructions Just download the repo and read the tutorial files

6 Dec 27, 2022