Skip to content

PyCon23 Tutorial

Description

This Tutorial introduces a meaningfully faster and simpler approach for building database web apps.

 

Overview

In this tutorial:

  • You'll build a complete, multi-table database web app - built, run, customized in VSCode
    • You'll be able to use it tomorrow on your organizations databases
  • You'll see several popular technologies in use (listed below)
    • You can explore these - running code, in a working project

 

What is API Logic Server?

API Logic Server is an open source Python system for creating customizable database web app projects from a database:

  • API: endpoint for each table - filtering, sorting, pagination and related data access

  • Admin UI: multi-page / multi-table apps, with page navigations, automatic joins and declarative hide/show

Projects are Customizable - use VSCode for edit/debug

Declare spreadsheet-like rules for multi-table derivations and constraints, customizable with Python (key innovation)

 

This tutorial introduces other technologies you perhaps wanted to explore, with running code:

Technology Used For
Python Customization
SQLAlchemy ORM database access
Flask Web Framework
VSCode IDE
Codespaces Cloud-based Dev Container
APIs Networked database access
Docker Isolated Containers
React-Admin Simplified React UI framework
Declarative What not how

 

Requirements

You'll need a laptop, and a GitHub account. Your dev environment will not be affected.

 

Audience

This tutorial is for developers interested in database systems, and the technologies above. Required background:

  • Basic programming: if/else, parameterized function calls, row.column object access, and basic event oriented programming. Python experience is not required.

  • Some database: aware of tables, columns and foreign keys.

 

Outline

Short lectures, plus watch/do labs:

Section Minutes Contents
Introduction 15 Project origin
Start Codespace 15 VSCode, in your browser
Create Project 15 Database pre-supplied
Explore 30 API, UI
Customize 30 * API: add endpoint
* UI: hide/show fields
Declarative Rules 30 Declare/debug
Wrap 15 (2.25 hours)

 

Text Outline

  • Introduction (15 min) - why the project was created

  • Create Codespace (15 min) - create Codespace, access in Browser

  • Create API Logic Project (15) - use CLI to create project from pre-supplied database

  • Explore Project (30) - explore the created UI, exercise the API in Swagger

  • Customize Project (30) - use VSCode (in Browser) to add an API Endpoint and debug it, hide/show UI fields

  • Declarative Rules (30) - use VSCode to declare spreadsheet like rules, and test/debug

  • Wrap (15 - 2.25 hours) - final remarks, other topics to explore (testing, schema migration)

Yes, a lot to cover, but automation makes it possible. Even easy.