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

Related tags

Documentation d4
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.

You might also like...
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

Project documentation with Markdown.

MkDocs Project documentation with Markdown. View the MkDocs documentation. Project release notes. Visit the MkDocs wiki for community resources, inclu

Your Project with Great Documentation.
Your Project with Great Documentation.

Read Latest Documentation - Browse GitHub Code Repository The only thing worse than documentation never written, is documentation written but never di

:blue_book: Automatic documentation from sources, for MkDocs.
:blue_book: Automatic documentation from sources, for MkDocs.

mkdocstrings Automatic documentation from sources, for MkDocs. Features Python handler features Requirements Installation Quick usage Features Languag

:blue_book: Automatic documentation from sources, for MkDocs.
:blue_book: Automatic documentation from sources, for MkDocs.

mkdocstrings Automatic documentation from sources, for MkDocs. Features - Python handler - Requirements - Installation - Quick usage Features Language

Seamlessly integrate pydantic models in your Sphinx documentation.
Seamlessly integrate pydantic models in your Sphinx documentation.

Seamlessly integrate pydantic models in your Sphinx documentation.

NetBox plugin for BGP related objects documentation
NetBox plugin for BGP related objects documentation

Netbox BGP Plugin Netbox plugin for BGP related objects documentation. Compatibility This plugin in compatible with NetBox 2.10 and later. Installatio

Documentation of the QR code found on new Austrian ID cards.

Austrian ID Card QR Code This document aims to be a complete documentation of the format used in the QR area on the back of new Austrian ID cards (Per

Swagger Documentation Generator for Django REST Framework: deprecated

Django REST Swagger: deprecated (2019-06-04) This project is no longer being maintained. Please consider drf-yasg as an alternative/successor. I haven

Comments
Owner
Markus Leist
Telecommunications Engineer, different equal // Dipl.-Ing. Nachrichtentechnik; Spielkind; anders gleich
Markus Leist
API Documentation for Python Projects

API Documentation for Python Projects. Example pdoc -o ./html pdoc generates this website: pdoc.dev/docs. Installation pip install pdoc pdoc is compat

mitmproxy 1.4k Jan 7, 2023
Automated Integration Testing and Live Documentation for your API

Automated Integration Testing and Live Documentation for your API

ScanAPI 1.3k Dec 30, 2022
A curated list of awesome tools for Sphinx Python Documentation Generator

Awesome Sphinx (Python Documentation Generator) A curated list of awesome extra libraries, software and resources for Sphinx (Python Documentation Gen

Hyunjun Kim 831 Dec 27, 2022
Run `black` on python code blocks in documentation files

blacken-docs Run black on python code blocks in documentation files. install pip install blacken-docs usage blacken-docs provides a single executable

Anthony Sottile 460 Dec 23, 2022
Portfolio project for Code Institute Full Stack software development course.

Comic Sales tracker This project is the third milestone project for the Code Institute Diploma in Full Stack Software Development. You can see the fin

null 1 Jan 10, 2022
SqlAlchemy Flask-Restful Swagger Json:API OpenAPI

SAFRS: Python OpenAPI & JSON:API Framework Overview Installation JSON:API Interface Resource Objects Relationships Methods Custom Methods Class Method

Thomas Pollet 361 Nov 16, 2022
Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

sphinx-autobuild Rebuild Sphinx documentation on changes, with live-reload in the browser. Installation sphinx-autobuild is available on PyPI. It can

Executable Books 440 Jan 6, 2023
Documentation generator for C++ based on Doxygen and mosra/m.css.

mosra/m.css is a Doxygen-based documentation generator that significantly improves on Doxygen's default output by controlling some of Doxygen's more unruly options, supplying it's own slick HTML+CSS generation and adding a fantastic live search feature.

Mark Gillard 109 Dec 7, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 2, 2023
Literate-style documentation generator.

888888b. 888 Y88b 888 888 888 d88P 888 888 .d8888b .d8888b .d88b. 8888888P" 888 888 d88P" d88P" d88""88b 888 888 888

Pycco 808 Dec 27, 2022