Create JSON:API and Web App from database, with LogicBank -- 40X more concise, Python for extensibility.
Project description
Key Features
The ApiLogicServer create-and-run
command creates a executable, customizable project that provides:
-
Admin App (running here on PythonAnywhere) - multi-page, multi-table, automatic joins
-
API, with Swagger - endpoint for each table, with filtering, pagination, related data
-
Business Logic, using rules for multi-table derivations and constraints, extensible with Python
- Declare rules as in a spreadsheet - 40X more concise than code
- Unique to API Logic Server :trophy:
Click here to see the docs.
Here's How: Single Command Project Creation
To create the sample API and app project in a minute or two -- start Docker, and execute the following commands (Windows, use Powershell):
cd ~/Desktop # directory of API Logic Server projects on local host
# Start the API Logic Server docker container
docker run -it --name api_logic_server --rm -p 5656:5656 -p 5002:5002 -v ${PWD}:/localhost apilogicserver/api_logic_server
ApiLogicServer create-and-run --project_name=/localhost/ApiLogicProject --db_url=
Your system is running - explore the data and api at localhost:5656, or on this deployed system.
VSCode and PyCharm users can execute within their IDE with these steps.
In addition to Docker, you can install locally; if Python 3.7+ is installed, it's typically:
python3 -m venv venv # may require python -m venv venv
source venv/bin/activate # windows venv\Scripts\activate
pip install ApiLogicServer # you may need to use pip3
ApiLogicServer create # create, or create-and-run; defaults provided
Process Overview - Project Creation from Database Introspection
Project creation is based on database schema introspection as shown below. Click for a video tutorial, showing complete project creation, execution, customization and debugging.
After you've explored the tutorial (created from this database), try out our dockerized test databases, and then try your own database.
Feature Summary
Feature | Providing | Why it Matters | Learn More |
---|---|---|---|
1. Admin App | Instant multi-page, multi-table app | Engage Business Users Back-office Admin |
safrs-react-admin |
2. JSON:API and Swagger | Endpoint for each table, with... Filtering, pagination, related data |
Unblock custom App Dev Application Integration |
SAFRS |
3. Transactional Logic | Spreadsheet-like Rules 40X more concise - compare legacy code |
Unique backend automation ... nearly half the system |
Logic Bank |
4. Customizable Project | Custom Data Model, Endpoints, Logic Use Python and yourIDE |
Customize and run Re-creation not required |
VS Code PyCharm ... |
5. Model Creation | Classes for Python-friendly ORM | Custom Data Access Used by API |
SQLAlchemy |
6. Behave Test Framework | Test Suite Automation Behave Logic Report Drive Automation with Agile |
Optimize Automation to get it fast Agile Collaboration to get it right |
Logic Tutorial |
The following tutorial is a good way to explore API Logic Server.
Installation
Install instructions are provided in the documentation.
Sample Tutorial - API Logic Server
The Tutorial contains a complete walk-through of creating, running and customizing a project. For the best experience, download and run the sample project.
Architectural Overview
Please see Architecture.
Contributions
This is an open source project, and we encourage contributions to the components noted below:
Component | Provides | Consider Adding |
---|---|---|
1. safrs-react-admin | Admin App | Hide/Show, Cascade Add |
2. JSON:API and Swagger | API Execution | Security, Serverless, Kubernetes |
3. Transactional Logic | Rule Enforcement | New rule types |
4. This project | API Logic Project Creation | Support for features described above |
To get started, please see API Logic Server Development.
Project Information
Resources
There are a number of facilities that will quickly enable you to get familiar with API Logic Server:
- Tutorial walks you through the steps of creating a server
- Video shows the steps of creating a server
Acknowledgements
Many thanks to
- Thomas Pollet, for SAFRS, SAFRS-react-admin, and invaluable design partnership
- Marelab, for react-admin
- Armin Ronacher, for Flask
- Mike Bayer, for SQLAlchemy
- Alex Grönholm, for Sqlacodegen
- Meera Datey, for React Admin prototyping
- Denny McKinney, for Tutorial review
- Achim Götz, for design collaboration and testing
- Max Tardiveau, for testing and help with Docker
- Michael Holleran, for design collaboration and testing
- Nishanth Shyamsundar, for review and testing
- Thomas Peters, for review and testing
- Daniel Gaspar, for Flask AppBuilder
- Gloria Huber and Denny McKinney, for doc review
Articles
There are a few articles that provide some orientation to Logic Bank and Flask App Builder. These technologies are automatically created when you use ApiLogicServer:
- How Automation Activates Agile
- How Automation Activates Agile - providing working software rapidly drives agile collaboration to define systems that meet actual needs, reducing requirements risk
- How to create application systems in moments
- Stop coding database backends…Declare them with one command.
- Instant Database Backends
- Extensible Rules - defining new rule types, using Python
- Declarative - exploring multi-statement declarative technology
- Automate Business Logic With Logic Bank - general introduction, discussions of extensibility, manageability and scalability
- Agile Design Automation With Logic Bank - focuses on automation, design flexibility and agile iterations
- Instant Web Apps
Change Log
07/04/2022 - 05.03.10: Product links to new gh-pages doc site
06/27/2022 - 05.03.06: nw-, with perform_customizations docker
06/22/2022 - 05.03.00: Docker support to load/run project (env or sh), create ApiLogicProject image
06/16/2022 - 05.02.23: Support nw- (sample, no customization) for evaluation
06/12/2022 - 05.02.22: No pyodbc by default, model customizations simplified, better logging
05/30/2022 - 05.02.16: Python 3.10, Dockerfile include, start info
05/25/2022 - 05.02.12: Verified for Python 3.10, improved support for configuring venv
05/04/2022 - 05.02.03: alembic for database migrations, admin-merge.yaml
04/24/2022 - 05.01.01: copy_children, with support for nesting (children and grandchildren, etc.)
03/27/2022 - 05.00.06: Introducing Behave test framework, LogicBank bugfix
02/18/2022 - 04.02.03: SqlServer fixes, rebuild creates '-created' versions for data model repair
01/18/2022 - 04.01.01: fix startup failure on created app (windows pip-install version only)
01/14/2022 - 04.01.00: add info_disp/show, attribute info, performance, date fix
12/26/2021 - 04.00.05: Introducing the Admin app, with Readme Tutorial
11/13/2021 - 03.50.00: rebuild-from-database/model, improved relationship support
11/04/2021 - 03.40.01: Per macOS Monterey, default ports to 5001, 5002
10/18/2021 - 03.20.11: Readme Tutorial for IDE users
10/16/2021 - 03.20.07: dev-network no longer required (see Releases)
10/03/2021 - 03.10.17: default db_url
10/02/2021 - 03.01.16: bugfix improper run arg for VSCode launch configuration
09/29/2021 - 03.01.15: run (now just runs without create), added create-and-run
09/25/2021 - 03.01.10: enable run command for Docker execution, pyodbc, fab create-by-copy
09/15/2021 - 03.00.09: auto-create .devcontainer for vscode, configure network, python & debug
09/10/2021 - 03.00.02: rename logic_bank to declare_logic, improved logging
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ApiLogicServer-5.3.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aab264df3003df9302d7ee50f04bda128ca814074f0314bb187c599eee12c5c |
|
MD5 | 8a101d33dd6c45cb4243f7e9a1a0b4ef |
|
BLAKE2b-256 | 2610f72eb6b129e65a7f66ad4b0aa8795560f99d11a9540128f67a4d7103fb00 |