CDK PynamoDB
AWS CDK Construct for DynamoDB Table from PynamoDB Model.
Streamline DynamoDB create and deploy with PynamoDB and AWS CDK.
This package provides a construct for creating a DynamoDB table using the AWS CDK and PynamoDB models. It simplifies the process of creating and deploying DynamoDB tables in your AWS environment.
Define your tables in a reusable and predictable way with infrastructure-as-code.
Installation
From PyPi:
$ pip install cdk-pynamodb
From GitHub:
$ pip install git+https://github.com/altoria/cdk-pynamoDB#egg=cdk-pynamodb
Basic Usage
Create a model that describes your DynamoDB table.
from pynamodb.models import Model
class UserTable(Model):
class Meta:
host = "http://localhost:8000"
table_name = "user-table"
billing_mode = PROVISIONED_BILLING_MODE
read_capacity_units = 10
write_capacity_units = 3
user_id = UnicodeAttribute(hash_key=True)
email = UnicodeAttribute(null=True)
Now, you can import and construct model in AWS CDK
from cdk_pynamodb import PynamoDBTable
from models import UserTable
from aws_cdk import Stack
from constructs import Construct
class Database(Stack):
def __init__(self, scope: Construct, id_: str):
super().__init__(scope, id_)
self.table = PynamoDBTable.from_pynamodb_model(self, pynamodb_model=UserTable)
Metadata
Release files for cdk-pynamodb 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cdk_pynamodb-0.1.1.tar.gz | 4.3 kB | Without provenance | Details for cdk_pynamodb-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cdk_pynamodb-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for cdk_pynamodb-0.1.1-py3-none-any.whl |
Total release size: 8.8 kB
Release files / cdk_pynamodb-0.1.1.tar.gz
| Download URL | cdk_pynamodb-0.1.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a56624958a76746bf8e697fd0484505b525256eefe64844da5f73e541b11766
|
|
BLAKE2b-256 checksum How to use checksums |
f0e91e6094d9905a94c33fd481cddf85ec657f97d6a258c5625305277d115270
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.1 Darwin/22.2.0
|
Release files / cdk_pynamodb-0.1.1-py3-none-any.whl
| Download URL | cdk_pynamodb-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a488686dcdca56c03c67522a8a2ead77deee81c310e3da0755d0b77eab6d7990
|
|
BLAKE2b-256 checksum How to use checksums |
9910188b718b64f07822d6acee11e25e61076473589143e93eb306b219413d49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.1 Darwin/22.2.0
|
Security for cdk-pynamodb 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.