Skip to main content

PostgreSQL REST API framework for AWS Lambda functions

Project description

Python PostgreSQL REST API framework for AWS Lambda functions

[!NOTE] Project status: Alpha

A REST API web framework for persisting records in a PostgreSQL database.

Supported features

  • Automatic creation of uid fields
  • Automatic setting of created_at and last_updated_at timestamps
  • Automatic setting of creator_uid and last_updater_uid
  • RDS with IAM credentials

Examples

See Examples docs directory

Sequence diagrams

High-level infrastructure

This sequence diagram shows how a lambda function running this library is intended to be deployed.

sequenceDiagram
    # Set up actors and participants
    actor User
    participant APIGW as API Gateway
    participant Cognito as Cognito
    box Purple This library
        participant Lambda as Lambda Function
    end
    participant RDS as RDS Database

    # Set up Sequences
    User ->> APIGW: HTTP /resource
    activate APIGW
        APIGW -->> Cognito: Authenticate
        activate Cognito
            Cognito ->> APIGW: Authenticated
        deactivate Cognito
        APIGW ->> Lambda: Send proxy integration request
        activate Lambda
            Lambda ->> RDS: Fetch/mutate
            activate RDS
                RDS -->> Lambda: Return records
            deactivate RDS
            Lambda -->> APIGW: Return response
        deactivate Lambda
        APIGW -->> User: Return response
    deactivate APIGW

Low-level architecture

This sequence diagram shows the layers within the library that handle request and response processing.

sequenceDiagram

    Participant APIGW as API Gateway
    box Purple This library as a deployed Lambda Function
        Participant CONT as Controller
        Participant REQM as Request Mapper
        Participant RESOURCEM as Resource Mapper
        Participant DBM as Database  Mapper
        Participant RESPONSEM as Response Mapper
    end
    Participant RDS

    APIGW ->> CONT: Send `event` dict
    activate CONT
        CONT ->> REQM: Map request
        activate REQM
            REQM ->> CONT: Mapped request
        deactivate REQM

        CONT ->> RESOURCEM: Map resource
        activate RESOURCEM
            RESOURCEM -->> CONT: Mapped resource
        deactivate RESOURCEM

        CONT ->> DBM: Request resource operation
        activate DBM
            DBM ->> RDS: Perform resource operation
            activate RDS
                RDS -->> DBM: Return resources
            deactivate RDS
            DBM -->> CONT: Return resource
        deactivate DBM

        CONT ->> RESPONSEM: Map response
        activate RESPONSEM
            RESPONSEM -->> CONT: Mapped response
        deactivate RESPONSEM

        CONT -->> APIGW: Return response
    deactivate CONT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygrestqlambda-0.0.9.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygrestqlambda-0.0.9-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file pygrestqlambda-0.0.9.tar.gz.

File metadata

  • Download URL: pygrestqlambda-0.0.9.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygrestqlambda-0.0.9.tar.gz
Algorithm Hash digest
SHA256 2c8cccc5aee4c880b2b427ce3f437eaa7ff2e5a6e42294fbd08fd871b89333e6
MD5 884cbe3198aa183c016cfa1fa7945f57
BLAKE2b-256 a8355032392ceeedd2949c242956be288c60f4944eefeee4ee9ffa1f2cc188fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrestqlambda-0.0.9.tar.gz:

Publisher: publish.yml on mesogate/pygrestqlambda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygrestqlambda-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: pygrestqlambda-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygrestqlambda-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 057cdadba83a16a6415e45f5e6706b2ae141af98c9a37617a76b772b98763c1c
MD5 be9b268e7f08a0223866c0c48936ae49
BLAKE2b-256 cfd16ae1d5546e6eea2f7a7e0b20b50637f1c20677a0e23d64401997e8123010

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrestqlambda-0.0.9-py3-none-any.whl:

Publisher: publish.yml on mesogate/pygrestqlambda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page