Skip to content

Home

Downloads Latest Version Supported Python versions

API Logic Server Intro

 

💡 Fastest, Easiest Way to Create Servers for Integration and App Backends

For Developers and their organizations seeking to increase business agility,

API Logic Server provides instant API creation from a database with one CLI command,
customizable with standards: Python, Flask, SQLAlchemy, and tools such as GitHub and your IDE.

Weeks-to-months of complex framework-based development is no longer necessary.
API Logic Server provides unique API Automation for instant integrations and app backends, and
unique Logic Automation with spreadsheet-like rules that decrease backend logic by 40X.

 


Quick Tour

API Logic Server is an open source Python project, consisting of a CLI and set of runtimes (SAFRS API, Flask, SQLAlchemy ORM, business logic engine) for project execution.

It runs as a standard pip install, or under Docker. For more on API Logic Server Architecture, see here.

Here's a quick tour of using API Logic Server: Create, Run, Customize.

 

1. Create: Microservice Automation Means Create Projects With a Single CLI Command

The ApiLogicServer create CLI command creates an executable project by reading the database schema in the db_url argument. For example, this will create an executable, customizable project from the pre-installed sample database:

ApiLogicServer create --project_name=ApiLogicProject --db_url=nw

 

2. Run: API Automation and App Automation

Microservice Automation has created a project that is executable, with:

  • API Automation means you have a running JSON:API - filtering, sorting, pagination and optimistic locking
  • App Automation means you have running Admin App - multi-page, multi-table, with automatic joins and lookups

The API unblocks UI Developers from waiting on lengthy API development cycles.
The Admin App can be used for instant business user collaboration.

See JSON:API and Admin App

 

You can run directly (python api_logic_server_run.py), or open it in your IDE and use the pre-created run configurations:

Admin App

Unlike frameworks which require significant time and expertise, the create command builds a complete API for your database, with endpoints for each table, including swagger. The Admin App provides a link to the Swagger:

Swagger

 

3. Customize: Logic Automation, Python Flexibility

Customize created projects in your IDE, with Python and standard libaries. Significantly, Microservice Automation also includes:.

  • Logic Automation means you customize logic and security, using Rules and Python in your IDE

Rules are unique and confer significant business agility - 40X more concise than code,
for security and multi-table derivations and constraints.

See Logic With Rules and Python

 

Rules are 40X more concise than code, and are extensible with Python:

Logic

For more on customization, click here.

 

Customization also provides no-code ad hoc integrations,
and enables Instant Business Relationships.

See Integration: APIs and Messages

 

The automatically created JSON:API provides no-code ad hoc integrations, enabling organizations to move beyond ETL. For example, other applications might require a customer record, and their addresses. The automatically created self-serve JSON:API requires no code, and reduces future custom API development:

  1. Create the JSON:API
  2. Declare security, to control access and row level authorization

Integrate with B2B Partners by creating custom endpoints using Python and Flask, with under 10 lines of code. Instant business relationships. Observe that:

  1. Update logic is partitioned out of each service - or UI - into shared Logic
  2. Mapping between SQLAlchemy rows and requests is automated with the RowDictMapper

APIs


Integrate internal systems with Kafka, using business logic events:

Messages

For more on integration, explore running code in the Application Integration Sample Tutorial.

 


Scenarios

Application Integration

 

As illustrated below, API Logic Server supports transactions from User Interfaces, and Application Integration - both via custom APIs and Kafka messages.

API Logic Server

JSON:API are a standard for self-serve APIs -- where clients can select the columns and the related data they require.

Self-serve APIs reduce the need for ongoing custom API development. Analogous to GraphQL, they fulfill requirements for UI development and ad hoc integration.

You can use Python, Flask and SQLAlchemy to create Custom APIs, e.g. for B2B Partners. In addition to the underlying logic, API Logic Server provides mapping services as described under Application Integration.

Appication Integration support also provides automation for producing and consuming Kafka messages. Here's an article: click here. To see these services in a tutorial, click here.

Unblock Client App Dev

 

Framework-based API development is time-consuming and complex. Since client App Dev depends on APIs, front-end dev is often blocked. This serialized dev process reduces business agility, and increases pressure on the team.

API Logic server can change that.

  1. API Automation means client App Dev can start as soon as you have a database

  2. Logic Automation means that

    1. Such logic - a substantial element of the system - is automatically partitioned out of each client into server-based logic. This reduces client coding, and enables the logic to be shared between user interfaces and services.
    2. Logic development can proceed in parallel with client App Dev

Here's an article, here. Or, the the Tutorial, here.

1 day projects with AI-Driven Schema Automation

 

API and Logic Automation begins with a database. But what if it's a new project, and there is no database.

You can certainly use your SQL tools. But we all know that SQL can be... tiresome.

AI provides a solution: Schema Automation. You can use ChatGPT to create the SQL DDL like this:

Create database definitions from ChatGPT

Create a sqlite database for customers, orders, items and product

Hints: use autonum keys, allow nulls, Decimal types, foreign keys, no check constraints.

Include a notes field for orders.

Create a few rows of only customer and product data.

Enforce the Check Credit requirement:

  1. Customer.Balance <= CreditLimit
  2. Customer.Balance = Sum(Order.AmountTotal where date shipped is null)
  3. Order.AmountTotal = Sum(Items.Amount)
  4. Items.Amount = Quantity * UnitPrice
  5. Store the Items.UnitPrice as a copy from Product.UnitPrice

Then, employ API Logic Server API and Logic Automation, and use Python and standard frameworks to finish the job.

Here's a tutorial you can to explore this: click here,or see this article.

  For additional Use Cases, click here.

 


Key Features

Feature Notes
API Automation Unblock Agile Collaboration, Custom App Dev
Logic Automation 40X More Concise than procedural code
Application Integration Automation with APIs and Kafka Messages
Rule-Base Row Level Security Authorization and Authentication
Self-Serve JSON:API UI Developers and Partners don't require API Dev
AI-Driven Automation Use ChatGPT to automate database creation
Admin Web App Agile Collaboration, Prototyping, Testing, Back Office Data Entry
Multiple Databases Application Integration
Deployment Automation Automated Container Creation, Azure Deployment

 


Video: Agile Collaboration

Click the image below for a video tutorial, showing complete project creation, execution, customization and debugging (instructions here). Or, see it using AI: click here.

Delivering the Agile Vision

 

Getting Started - Install, Tutorial

API Logic Server is designed to make it easy to get started:

 

In addition to this app dev oriented tutorial, you can also explore:

  • Messaging: the Application Integration Tutorial illustrates using messaging, self-serve APIs and customized APIs, choreographed with rules and Python.

  • Deployment: the Deployment Tutorial illustrates various ways to containerize and deploy your applications

  • Using AI: the AI-Driven Automation Tutorial shows how you can use ChatGPT to create new databases from english descriptions, to bootstrap a very rapid create / collaborate / iterate Agile cycle.

 

Release Notes

To see Release Notes, click here.

Preview Version

Show me how

 

This pre-release includes:

  • Many simplfications for Tutorial

You can try it at (you may need to use python3):

python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple ApiLogicServer==10.01.25

Or use (neither available currently):

docker run -it --name api_logic_server --rm -p 5656:5656 -p 5002:5002 -v ~/dev/servers:/localhost apilogicserver/api_logic_server_x

Or, you can use the beta version on codespaces.

 

Works With

API Logic Server works with key elements of your existing infrastructure:

Works With Notes
AI Use ChatGPT to create databases, and use API Logic Server to turn these into projects
Other Systems APIs and Messages - with logic
Databases Tested with MySQL, Sql/Server, Postgres, and Oracle
Client Frameworks Creates instant APIs that factors out business logic, where it is automatically shared for User Interfaces, APIs, and Messages
Your IDE Creates standard projects you can customize in your IDE, such as VSCode and PyCharm
Messaging Produce and Consume Kafka Messages
Deployment Scripts to create container images, and deploy them to the cloud
Agile and Test Methodologies Use Behave to capture requirements, rapidly implement them with API Logic Server, collaborate with Business Users, and test with the Behave framework

 

Contact Us

We'd love to hear from you:

  1. Email: apilogicserver@gmail.com
  2. Slack: https://apilogicserver.slack.com

 

Detailed Product Information

For more product information, click here.