Skip to main content

DS Organization CDK Constructs

Project description

Building and Publishing CDK Constructs to PyPi

Follow these steps to build your CDK constructs and publish them to PyPi:

  1. Ensure you have the necessary tools installed

    You'll need Python, pip, setuptools, wheel, and twine. You can install these with pip:

    pip install --upgrade setuptools wheel twine
    
  2. Build your package

    Navigate to the directory containing your setup.py file and run:

    python setup.py sdist bdist_wheel
    

    This will create a source archive (.tar.gz) and a wheel file (.whl) in a newly created dist directory.

  3. Check your package with twine

    Before uploading, it's a good idea to check your package with twine:

    twine check dist/*
    

    This will check for common errors. If everything is okay, you can proceed to the next step.

  4. Upload your package to PyPi

    You can upload your package using twine. Replace dist/* with the path to the files you want to upload:

    twine upload dist/*
    

    You'll be prompted for your PyPi username and password. If you have two-factor authentication enabled on PyPi, you'll need to generate an API token and use that instead of your password.

  5. Verify your package

    Go to your PyPi account and verify that the package was uploaded successfully.

API Gateway Construct

This package provides a construct for AWS Cloud Development Kit (CDK) to create an API Gateway with dynamic routes and methods based on a configuration.

Features

  • Creates an API Gateway with a custom name and description.
  • Dynamically creates resources and methods based on a provided configuration.
  • Supports Lambda integrations.

Installation

To install this package, run the following command in your terminal:

pip install dscdk.apigateway

Usage

from aws_cdk import App
from apigateway_construct import ApiGatewayStack

app = App()

lambda_stack = ...  # Your Lambda stack

config = {
    'routes': [
        {
            'path': '/myresource',
            'methods': ['GET'],
            'integration': 'lambda',
            'lambdaFunctionName': 'MyFunction',
        },
        # Add more routes as needed
    ],
}

ApiGatewayStack(app, "ApiGatewayStack", lambda_stack=lambda_stack, config=config)

app.synth()

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

org-ds-cdk-0.1.7.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

org_ds_cdk-0.1.7-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file org-ds-cdk-0.1.7.tar.gz.

File metadata

  • Download URL: org-ds-cdk-0.1.7.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for org-ds-cdk-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e2e65b454423f82d6e55c12bdf283f748c6a215d579613d64c00ec34bf4994de
MD5 0903a7e2e355c967bb968c19478b5267
BLAKE2b-256 d6f7c135576dbd1ee6837381cd81f2fac462ab3ec758fe7408d28fd83831d9e9

See more details on using hashes here.

File details

Details for the file org_ds_cdk-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: org_ds_cdk-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for org_ds_cdk-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3f1e754ac38ecb84c8f0f0a2c903c25b22ab1facbb070bfa5e5f1d062f4cce02
MD5 0ea30b47a0573250a1cc005723daae98
BLAKE2b-256 805d457de1aeeb5754f14dea04f069e8ec0cf8cf1c1b3a4ced9b8bfd6dfb8c0a

See more details on using hashes here.

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