Package: kegstandcli
The Developer's Toolbelt For AcceleratingMean Time To Partyon AWSCreated byJens Rolandand fueled by a non-zero amount of alcoholWatch a 3-minute demo🥂💃🕺 Welcome to the Party! 🥂💃🕺Kegstand is a free and open-source framework for creating Python APIs and services. It allows you to rapidly build and deploy services on AWS. We all have better things to do thanprint(json.dumps(event))all day long, and Kegstand is here to help you get to the party —and into Prod— a lot faster.It provides:A CLI tool for creating and deploying your services.A decorator based API abstracting away the boilerplate of Lambda, API Gateway, Cognito, and more.The full power of CDK to define and deploy arbitrary AWS resources with your services."Experience a streamlined cloud development process, enhanced productivity, and hit that "party" button sooner with Kegstand!">— GPT-4, official spokesbot for the Kegstand teamLearn more on theKegstand website.PrerequisitesPython 3.8+Poetry(recommended)AnAWS accountTheCDK CLI configured on the local machine and initialized on the AWS accountThe AWS CLIconfigured with credentialsCopierproject scaffolding tool (recommended)npxfor installing CLI tools (recommended)A well-pouredBelgian style brown aleQuick startTo create a service with Kegstand, you'll need a Python project with a few dependencies and a folder structure following the Kegstand convention.You can create this in a few seconds, either with the Kegstand CLI or usingCopier.# Using the Kegstand CLI>pipxinstallkegstandcli
>kegnewmy-service# Using Copier>copiercopy-dproject_name=my-servicegh:JensRoland/kegstand-project-template.Either method will create a new project folder calledmy-servicecontaining:my-service
├──.gitignore# Standard .gitignore file├──pyproject.toml# Project configuration└──src└──api└──public└──hello.py# Logic for /hello/Kegstand projects are minimal by design, so a fresh project folder contains just those 3 files. Well, apart from a few empty__init__.pygatecrashers, but we can safely ignore those.To install the dependencies for the new project:>cdmy-service
>poetryinstallFinally, to build and deploy the service to AWS:>poetryrunkegdeployYou should now be able to access the API endpoint athttps://<api-id>.execute-api.<region>.amazonaws.com/prod/hello.DocumentationFor further examples and more advanced usage, see theofficial documentation.RoadmapHere are some notable changes, fixes and features that are planned for development:0.4.0More content onkegstand.devCustom domain namesSupport multiple repos using the same domain (and API Gateway)Simplify the folder structure fromsrc/api/resources/<resource-name>/<method>.pytosrc/api/<resource-name>.pyPre-1.0.0Specify event triggers for Lambda functions: S3, SNS, SQS, DynamoDB, Cloudwatch CRON scheduled events, etc.Pagination helperRecord a screencastfor the READMEAutogenerated docs usingMkDocsGitHub Actions workflow for pushing docs to the website1.0.0Intuitive and mostly automated API VersioningSimple way to define/override core API/Lambda properties such as CPU/MEM, Python runtime version, warm pool (!), and concurrencyDeploy Lambda-only microservices with no API GatewayFutureConfigurable log levelAdd AWS tags in the Kegstand config and they will be applied to the generated resourcesEasily addAWS Lambda LayersAdd support for APIs usingFastAPIwithManguminstead of the default Kegstand API framework, and just provide deployment helpers for the API Gateway and LambdaImproved output from deploy command; friendly post-deploy instructions for testing your APIVersion bumper withbump2versionInclude more goodies fromLambda Powertools- tracing, metrics, etc.Add support for APIs using pureLambda Powertoolsinstead of the default Kegstand API framework, and just provide deployment helpers for the API Gateway and LambdaUnit testing helpers (wrap moto and make it all a little more DRY and intuitive)Secure endpoints which require re-authentication (and/or MFA) so a refreshed token isn’t enough (to, say, delete your account or change your credit card info)Live Lambda development a la SSTBuild and deploy gRPC endpoints (or similar alternative)Build and deploy GraphQL endpointsBuild and deploy stream processors?Option to teardown before deploying:keg deploy --force-redeployUse env vars to populate values in kegstand.tomlMerge Kegstand and Beth into one toolCDK PipelinesSupport HTTP method-specific files (e.g.get.py,post.py, etc.)Upgrade Copier once thetemplate-deleting bugfixis released