Releases: ApiLogicServer/ApiLogicServer-src
Integration Sample Preview, Oracle thick
This release is available via pip or docker, containing:
Integration Sample Preview
Integration Services sample illustrates accommodating custom API definitions for incoming and outgoing requests. It is described here. This sample is a technology preview, and doc is under construction.
IntegrationServices
This support includes IntegrationServices
, providing declarative dict/row mapping with attribute map/alias support, related data, and lookups. For example, definition:
Oracle Thick Client Support
Some secure corporate networks require Oracle Thick Support.
ApiLogicServer curl
This support has been extended to support Post. Its use is shown in the Integration Sample Preview, above.
After flush Event
As shown in declare_logic.py
in the Integration Sample, this new event enables logic to obtain autonum values, useful in sending api/message alerts to other systems. For example:
def send_order_to_shipping(row: models.Order, old_row: models.Order, logic_row: LogicRow):
"""
Format row per shipping requirements, and send (e.g., a message)
NB: the after_flush event makes Order.Id avaible. Contrast to congratulate_sales_rep().
Args:
row (models.Order): inserted Order
old_row (models.Order): n/a
logic_row (LogicRow): bundles curr/old row, with ins/upd/dlt logic
"""
order_def = OrderShipping()
order_dict = order_def.row_to_dict(row = row)
json_order_response = jsonify({"order": order_dict})
json_order = json_order_response.data.decode('utf-8')
print(f'\n\nSend to Shipping:\n{json_order}')
Rule.after_flush_row_event(on_class=models.Order, calling=send_order_to_shipping)
Safrs 3.1.3
Version upgrade, described here.
ApiLogicServer curl
CLI curl
support
This release simplifies using the CLI to issue curl
requests. In addition to using Swagger or Postman, it's sometimes useful to test your API using cURL. If you've activated security, such commands fail due a missing auth header. This is now addressed as described here.
Improved CLI for rebuild
You can now rebuilt projects using the terminal window from the project, as described here.
Improved Basic Demo documentation
We encourage you to try the Basic Demo. It's described here, now with clearer information on exploring the created results.
Simplified Basic Demo
We've updated the Basic Demo page, which you can run with these instructions. The customization and iteration process are now scripted, to make things simpler and reduce errors.
We're seeking feedback, so let us know what you think.
Basic Demo
We've prepared a Basic Demo page, which you can run with these instructions. We're seeking feedback, so let us know what you think.
This release also contains some bug fixes:
Security: Global Filters, Permissions
This release provides significant enhancements as described below.
Security
-
Global Filters simplify filters across multiple roles, such as multi-tenant support, hiding secure or soft-deleted rows, or rows outside the users region (etc)
-
Permissions designate which roles have read/update access to classes
-
Debugging Support is provided though sophisticated logging, enabling you to see what filters were applied, and how they affect the SQL select
Logic
The rule engine now support insert parent to create group-by parent rows automatically. There is also a new sample illustrating this feature.
Oracle connectivity support
For Oracle databases, ApiLogicServer create
builds a connection debug aid
Bug fixes
The release fixes:
AI Automation, DevOps
This release is provided on pip
and docker.
AI-Driven Automation
If you don't already have a database, AI-Driven Automation shows how to use ChatGPT to create a database, and execute a complete Agile cycle in 6 minutes:
- Create working software
- Deploy for collaboration
- Iterate
DevOps Automation
Support has been enhanced to minimize errors and effort in editing scripts to create and deploy images. For more information, see DevOps Automation.
Bug Fixes
This release includes an updated version of LogicBank that fixes a delete bug.
Oracle, AI Preview
This release is available both through pip install
and docker. It provides:
-
Oracle Support, as described here
-
** (AI-driven automation (preview)** using ChatGPT, as described here. Create and deploy a micro service, starting just from a natural language description. This realizes the Agile vision of
- Working Software, with instant creation of an executable, customizable project, driving
- Collaboration, with deployment automation
- Iteration, with logic automation
Oracle Support
API Logic Server now runs with Oracle, as described here.
Bug Fix admin.yml for converted table/class names
This release fixes Issue 16, where bad admin.yml was created when table names differ from SQLAlchemy class names. This occurs for singularization, use of under scores, etc.
It is currently released for PyPi; docker release is pending.
Cloud Deployment Automation, Security / Admin App Bug Fixes
Working software - deployed - to engage collaboration / iteration
The key theme of this release how API Logic Server supports the Agile vision of working software - instantly and deployed - to engage collaboration and iteration:
- Working Software Now: APIs and Admin apps created instantly
- Collaboration via Automated Cloud Deployment -- new in this release
- This makes dev previews available in the cloud for UI Developers (via the APIs) and Business Users (via the Admin App)
- Iteration: using rules and Python as required
Click here for more information.
Automated Cloud Deployment
The devops
directory provides scripts for automated cloud deployment, including:
- Containerizing your application
- Adding Security
- Multi-Container Docker Compose
- Azure Deployment Script Automation
The documentation contains Worked Examples, for creating and deploying multi-container applications, with test databases you can use for MySQL and Postgres.
Flexible AuthDB
You can now configure AuthDB
with different database types, and add your own custom user properties.
Docker Databases now include AuthDB
The Docker Test Databases now include AuthDB for MySQL and Postgres. These are used in the worked examples noted above.
Custom 'AuthDB`
The CLI now enables you to designate your own authdb:
-
this enables you to use your own User properties in
Grant
declarations. -
authdb
scripts are created to get you started
For example:
ApiLogicServer add-auth --project_name=. --db_url=mysql+pymysql://root:p@localhost:3306/authdb
meta data api (preview)
Created APIs now include an endpoint in api/customize_api.py
to return meta data:
curl -X GET "http://localhost:5656/metadata?include=attributes"
CORS enhancements
CORS support has been extended in api_logic_server_run.py
with:
flask_app = Flask("API Logic Server", template_folder='ui/templates') # templates to load ui/admin/admin.yaml
CORS(flask_app, resources=[{r"/api/*": {"origins": "*"}}],
allow_headers=["Content-Type", "Authorization", "Access-Control-Allow-Credentials"],supports_credentials=True)
Bug Fixes
Admin App: Favorites, UserKey, Lookups
The Predictive Joins, Lookups not working issue has been resolved. So, for example, the classicmodels
app looks like this:
Internals
The internal source code has been reworked significantly, including documentation enhancements and refactoring (e.g., introduction of metadata.py
.