DEV Community

DanielSanchez97
DanielSanchez97

Posted on

Cdev: A New Python Serverless Development Framework

I am excited to share an early Alpha of Cdev, a new Python Serverless Development framework. Cdev is designed to help developers build and deploy Serverless applications on AWS quickly and easily by providing out of the box optimizations for a developer’s project. Although Serverless Development can provide many benefits, it can come with many challenges that require developers to change their workflows and development experience. Cdev was designed from scratch to tackle the problems that arise with Serverless Development while providing a familiar experience for Python developers.

Some of the key features of Cdev include:

  • Easy deployments: Cdev makes it easy to deploy your code to AWS Lambda by allowing you deploy a Lambda function with just a single extra annotation.

  • Serverless Optimizations: Cdev provides optimizations that understand and parse out individual functions from files to automatically create artifacts that are optimized for Serverless Platforms.

  • Automated Third Party Package Deployments: Cdev manages the bundling of third party packages used by functions.

  • Infrastructure as Code: Cdev provides high level constructs for other Serverless Resources (DynamoDB, SQS, S3, etc) that easily integrate with your Serverless Functions.

  • Isolated Environments: Create isolated development environments in the Cloud using the Cdev CLI.

When I first began learning about Serverless Development, one of the points of friction that felt unique to Serverless Development was having to break my functions into individual files or accept tradeoffs around package size, cold starts (latency), and purity of each Serverless Function only containing its own logic. To solve this issue, I created a process that analyzes a project’s Abstract Syntax Tree to understand and create optimized deployment artifacts. The created artifacts contain only the code necessary for an individual function, which provides the ability to track changes to individual functions even if they are contained in the same file.

One of the other challenges when transitioning to Serverless Development is understanding the process of packaging a function’s dependencies. Using the outputted artifacts from the Syntax Tree optimization, Cdev provides automated bundling of relative and packaged dependencies for your functions. These created dependencies are optimized to only contain the dependencies used by an individual function, which helps lower the cold start of your functions and avoid platform limitation regarding package sizes.

These optimizations are provided as part of a larger framework that strives to provide an approachable place for any Python developer to begin building Serverless applications. The framework provides high level Infrastructure as Code components for the most popular Serverless Resources on AWS that attempt to simplify connecting different Serverless resources. Along with helping developers get started fast, Cdev provides features like isolated deployment environments to help keep development fast as a project grows.

Currently, the framework is in an early alpha stage and has many rough edges, but it has all the features necessary to start building Serverless Python projects. I hope that Cdev will be a valuable tool for Python developers who want to build and deploy serverless applications quickly and easily. Thanks for checking it out and looking forward to any feedback!

Top comments (0)