{"id":28245605,"url":"https://github.com/apilogicserver/postgres-nw","last_synced_at":"2025-07-24T01:39:41.291Z","repository":{"id":188146994,"uuid":"678181488","full_name":"ApiLogicServer/postgres-nw","owner":"ApiLogicServer","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-01T13:38:13.000Z","size":237,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T09:12:54.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ApiLogicServer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security/__init__.py","support":null,"governance":null}},"created_at":"2023-08-14T00:19:37.000Z","updated_at":"2023-08-14T00:40:40.000Z","dependencies_parsed_at":"2023-10-01T14:58:54.941Z","dependency_job_id":null,"html_url":"https://github.com/ApiLogicServer/postgres-nw","commit_stats":null,"previous_names":["apilogicserver/postgres-nw"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ApiLogicServer/postgres-nw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApiLogicServer%2Fpostgres-nw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApiLogicServer%2Fpostgres-nw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApiLogicServer%2Fpostgres-nw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApiLogicServer%2Fpostgres-nw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ApiLogicServer","download_url":"https://codeload.github.com/ApiLogicServer/postgres-nw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ApiLogicServer%2Fpostgres-nw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266780423,"owners_count":23983043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-19T09:12:53.591Z","updated_at":"2025-07-24T01:39:41.279Z","avatar_url":"https://github.com/ApiLogicServer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using this readme\n\nThis readme contains the following sections:\n\n\n| Section                  | Info                               |\n|:-------------------------|:-----------------------------------|\n| [1. Setup and Run](#1-setup-and-run) | Information about API Logic Server, and setting up your venv     |\n| [2. Deployment](#2-deployment) | Deploy early previews to the cloud - enable team collaboration     |\n| [3. Key Customization Files](#3-key-customization-files) | Quick idea of the key files you'll alter        |\n| [4. Project Requirements](#4-project-requirements)     | Options for capturing requirements |\n| [5. Project Information](#5-project-information)                | Creation dates, versions          |\n| [Appendix - Key Technologies](#appendix-key-technologies)    | Doc links of key libraries         |\n\n\u0026nbsp;\n\n# 1. Setup and Run\n\nTo run your project, the system requires various runtime systems for data access, api, and logic.  These are included with API Logic Server ([architecture doc here](https://apilogicserver.github.io/Docs/Architecture-What-Is/)).  So, to run your project ([instructions here](#setup-instructions)):\n\n1.  __Establish your Python Environment__ to activate these runtime systems\n2. __Run__\n\nSetup your Python environment, according to whether you did a *local install*, or *Docker*.  Choose the appropriate section, then run.\n\n\u0026nbsp;\n\n## Establish Your Python Environment - Local Install\n\nYou `requirements.txt` has already been created, so...\n\n```bash title=\"Install API Logic Server in a Virtual Environment\"\npython -m venv venv                        # may require python3 -m venv venv\nvenv\\Scripts\\activate                      # mac/linux: source venv/bin/activate\npython -m pip install -r requirements.txt  # accept \"new Virtual environment\"\n```\n\nNotes:\n\n* See also the `venv_setup` directory in this API Logic Project.\n\n* If using SqlServer, install `pyodbc`.  Not required for docker-based projects.  For local installs, see the [Quick Start](https://apilogicserver.github.io/Docs/Install-pyodbc/).\n\n* If you are creating multiple projects, you may wish to use a [Shared venv](https://apilogicserver.github.io/Docs/Project-Env/).\n\n\u0026nbsp;\n\n## Establish Your Python Environment - Docker\n\nYour runtime systems are part of Dev Container, which you probably activated when you [opened the project](https://apilogicserver.github.io/Docs/IDE-Execute/).  \n * If you did not accept the \"Open in Container\" option when you started VSCode, use __View \u003e Command Palette \u003e Remote-Containers: Reopen in Container__.\n\n\u0026nbsp;\n\n## Run\n\nTo run your project\n\n![Start Project](https://github.com/ApiLogicServer/Docs/blob/main/docs/images/tutorial/2-apilogicproject-nutshell.png?raw=true)\n\nAs shown above:\n\n1. Use the pre-supplied Run Configuration; use either:\n    * `**ApiLogicServer - No Security (e.g., for behave tests** to run *with security* (recommended initially)\n    * `**ApiLogicServer** to run [with security](https://apilogicserver.github.io/Docs/Security-Swagger/)\n2. Click the url in the console to start the Admin App\n    * Use it to explore your data (shown below)\n    * And your API (via Swagger)\n\n![Admin App](https://github.com/ApiLogicServer/Docs/blob/main/docs/images/ui-admin/run-admin-app.png?raw=true)\n\n\u0026nbsp;\n\n# 2. Deployment\n\nThe `devops` directory contains several scripts for creating container images, testing them, and deploying them.\n\nSince API Logic Server creates working software (UI, API), you can do this after creating your project, to [collaborate with your team](https://apilogicserver.github.io/Docs/DevOps-Containers-Preview/).\n\n\u0026nbsp;\n\n# 3. Key Customization Files\n\nYour project is ready to run, but it's likely you'll want to customize it - declare logic, new endpoints, etc.\n\nThe ___Key Customization Files___ listed in the table below are created as stubs, intended for you to add customizations that extend\nthe created API, Logic and Web App.\n\n* Since they are separate files, the project can be\n[rebuilt](https://apilogicserver.github.io/Docs/Project-Rebuild/) (e.g., synchronized with a revised schema), preserving your customizations.\n\nPlease see the `nw` sample for examples of typical customizations.  You can open it in GitHub (use Shift + \".\" to view in project mode) - [click here](https://github.com/ApiLogicServer/demo).\n\n| Directory | Usage                         | Key Customization File             | Typical Customization                                                                 |\n|:-------------- |:------------------------------|:-----------------------------------|:--------------------------------------------------------------------------------------|\n| ```api``` | **JSON:API**\u003cbr\u003e*Ready to Run*                    | ```api/customize_api.py```         | Add new end points / services                                                         |\n| ```ui``` | **Multi-Page Admin App**\u003cbr\u003e*Ready to Run*  | ```ui/admin/admin.yaml```          | Control field display - order, captions etc.                                          |\n| ```database``` | SQLAlchemy Data Model Classes | ```database/customize_models.py``` | Add derived attributes, and relationships missing in the schema                       |\n| ```logic``` | **Transactional Logic**\u003cbr\u003espreadsheet-like rules   | ```logic/declare_logic.py```       | Declare multi-table derivations, constraints, and Python events such as send mail / messages |\n| ```security``` | Authentication, Authorization   | ```security/declare_security.py```          | Control login, role-based row access         |\n| ```tests``` | Behave Test Suite              | ```tests/api_logic_server_behave/features```          | Declare and implement [Behave Tests](https://apilogicserver.github.io/Docs/Behave/)                                          |\n\n\u0026nbsp;\n\n# 4. Project Requirements\n\nOptionally, you can **document requirements** as part of an **executable test plan**.  Test plan execution creates documentation (in markdown), including **requirements traceability** into implementation.  [See example here](test/api_logic_server_behave/reports/Behave%20Logic%20Report%20Sample.md).\n\n\u0026nbsp;\n\n# 5. Project Information\n\nThis API Logic Project was created with the `ApiLogicServer create` command.\nFor information on Managing API Logic Projects, [click here](https://apilogicserver.github.io/Docs/Project-Structure).\n\n| About                    | Info                               |\n|:-------------------------|:-----------------------------------|\n| Created                  | October 01, 2023 06:34:56                      |\n| API Logic Server Version | 09.04.00           |\n| Created in directory     | ../../../servers/postgres-nw |\n| API Name                 | api          |\n| Execution begins with    | `api_logic_server_run.py`          |\n\n\n\u0026nbsp;\n\n# Appendix: Key Technologies\n\nAPI Logic Server is based on the projects shown below.\nConsult their documentation for important information.\n\n\u0026nbsp;\n\n### SARFS JSON:API Server\n\n[SAFRS: Python OpenAPI \u0026 JSON:API Framework](https://github.com/thomaxxl/safrs)\n\nSAFRS is an acronym for SqlAlchemy Flask-Restful Swagger.\nThe purpose of this framework is to help python developers create\na self-documenting JSON API for sqlalchemy database objects and relationships.\n\nThese objects are serialized to JSON and \ncreated, retrieved, updated and deleted through the JSON API.\nOptionally, custom resource object methods can be exposed and invoked using JSON.\n\nClass and method descriptions and examples can be provided\nin yaml syntax in the code comments.\n\nThe description is parsed and shown in the swagger web interface.\nThe result is an easy-to-use\nswagger/OpenAPI and JSON:API compliant API implementation.\n\n\u0026nbsp;\n\n### LogicBank\n[Transaction Logic for SQLAlchemy Object Models](https://apilogicserver.github.io/Docs/Logic-Why/)\n\nUse Logic Bank to govern SQLAlchemy update transaction logic - \nmulti-table derivations, constraints, and actions such as sending mail or messages. Logic consists of _both:_\n\n*   **Rules - 40X** more concise using a spreadsheet-like paradigm, and\n\n*   **Python - control and extensibility,** using standard tools and techniques\n\nLogic Bank is based on SQLAlchemy - it handles `before_flush` events to enforce your logic.\nYour logic therefore applies to any SQLAlchemy-based access - JSON:Api, Admin App, etc.\n\n\u0026nbsp;\n\n### SQLAlchemy\n\n[Object Relational Mapping for Python](https://docs.sqlalchemy.org/en/13/).\n\nSQLAlchemy provides Python-friendly database access for Python.\n\nIt is used by JSON:Api, Logic Bank, and the Admin App.\n\nSQLAlchemy processing is based on Python `model` classes,\ncreated automatically by API Logic Server from your database,\nand saved in the `database` directory.\n\n\u0026nbsp;\n\n### Admin App\n\nThis generated project also contains a React Admin app:\n* Multi-page - including page transitions to \"drill down\"\n* Multi-table - master / details (with tab sheets)\n* Intelligent layout - favorite fields first, predictive joins, etc\n* Logic Aware - updates are monitored by business logic\n\n\u0026nbsp;\n\n### Python Tips\n\nIf you are new to Python, check out [these tips](https://apilogicserver.github.io/Docs/Tech-Python/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapilogicserver%2Fpostgres-nw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapilogicserver%2Fpostgres-nw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapilogicserver%2Fpostgres-nw/lists"}