Giter Club home page Giter Club logo

api_logic_server's Introduction

API Logic Server

Created: 2021-03-11 18:43:55.291389

From Prototype: 1.1 (Mar 3, 2021)

Clone from: /Users/val/xdev/ApiLogicServer/prototype

API Logic Server is based on the projects shown below. Consult their documentation for important information.

SARFS JSON:Api Server

SAFRS: Python OpenAPI & JSON:API Framework

SAFRS is an acronym for SqlAlchemy Flask-Restful Swagger. The purpose of this framework is to help python developers create a self-documenting JSON API for sqlalchemy database objects and relationships.

These objects can be serialized to JSON and can be created, retrieved, updated and deleted through the JSON API. Optionally, custom resource object methods can be exposed and invoked using JSON.

Class and method descriptions and examples can be provided in yaml syntax in the code comments.

The description is parsed and shown in the swagger web interface. The result is an easy-to-use swagger/OpenAPI and JSON:API compliant API implementation.

LogicBank

Transaction Rules for SQLAlchemy Object Models

Use Logic Bank to govern SQLAlchemy update transaction logic - multi-table derivations, constraints, and actions such as sending mail or messages. Logic consists of both:

  • Rules - 40X more concise using a spreadsheet-like paradigm, and

  • Python - control and extensibility, using standard tools and techniques

Logic Bank is based on SQLAlchemy - it handles before_flush events to enforce your logic. Your logic therefore applies to any SQLAlchemy-based access - JSON:Api, Flask App Builder, etc.

Declare your logic in: logic/logic_bank.py

SQLAlchemy

Object Relational Mapping for Python.

SQLAlchemy provides Python-friendly database access for Python.

It is used by JSON:Api, Logic Bank, and Flask App Builder.

SQLAlchemy processing is based on Python model classes, created automatically by API Logic Server from your database, and saved in the database directory.

Basic Web App - Flask App Builder

This generated project also contains a basic web app

  • Multi-page - including page transitions to "drill down"

  • Multi-table - master / details (with tab sheets)

  • Intelligent layout - favorite fields first, predictive joins, etc

    Edit your pages in: ui/basic_web_app/app/view.py

Preparing Flask AppBuilder

Before you run your app, you must create admin data, and address certain restrictions. For more information, see Working with Flask AppBuilder.

Check it out

Install your projects' environment:

cd <your project>
test> cd my_new_project
virtualenv venv
source venv/bin/activate  # windows venv\Scripts\activate
pip install -r requirements.txt
python api_logic_server_run.py

Then, run:

  • Open API (Swagger) - localhost:5000/api

  • Basic Web App - localhost:8080

Project Structure

Logic: /logic/logic_bank.py
SQLAlchemy Models: /database
Services: /api
Flask App: /ui

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.