Skip to content

claranet-it/devrel-localstack

Repository files navigation

Devrel Localstack Demo

Pre-requisites

  • Python 3.12.x
  • Poetry 1.8.x
  • Terraform 1.7.x
  • Terraform Local

Tools and Frameworks

  • FastApi
  • Uvicorn
  • pytest
  • pre-commit
  • ruff

Setting Up the Project Locally

  1. Create a Virtual Environment

    python3 -m venv env
  2. Activate the Virtual Environment

      source env/bin/activate
  3. Install Dependencies

    make install
  4. Run the Server Locally

    make start-local [port=xxxx]

    Example:

    make start-local [port=3000]

Install pre-commit hooks

make pre-commit-install

Infrastructure

  1. Create terraform.tfvars (Duplicate from terraform.tfvars.example)

  2. Create infrastructure with Terraform Local

    make terraform-init && make terraform-apply
    
  3. Verify

    List s3 bucket files

    make s3-list-bookings

    Download file from S3 bucket

    make s3-cp-local-booking key=<bucket-key>

    Scan DynamoDB table

    make dynamodb-scan-bookings

Commands

Lint

make lint

Lint and fix

make lint-fix

Format

make format

Launch tests

make test

Launch test with coverage

make coverage

Run pre-commit hooks

make pre-commit

About

Devrel - Localstack Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published