nix-cde
Our great sponsors
aws-lambda-python-runtime-interface-client | nix-cde | |
---|---|---|
4 | 9 | |
244 | 29 | |
1.6% | - | |
6.6 | 6.4 | |
10 days ago | 12 days ago | |
Python | Nix | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
aws-lambda-python-runtime-interface-client
-
Python 3.11 delivers.
There is an AWS provided runtime client that will probably work with Python 3.11, but if not the API is small enough to roll your own. Or generate one with the OpenAPI Spec they provide.
-
Running Python 3.11 on AWS Lambda
Let's see what's happening here. We initiate a multi-phase build to reduce the size of our final image. On the FROM lines we choose which Python version we want to use for our runtime. If you wanted to work with Python 3.10 then you could simply replace the 3.11 part with 3.10. As a last step of the first build phase we install awslambdaric, which is the AWS Lambda Runtime Interface Client which makes sure that the Lambda environment is able to communicate with our own code. In the 2nd stage we simply copy the runtime interface client into our final image.
-
JFrog Detects Malicious PyPI Packages Stealing Credit Cards and Injecting Code
Yep. In fact, I recently had to deal with this monstrosity https://pypi.org/project/awslambdaric whose setup.py invokes a shell script https://github.com/aws/aws-lambda-python-runtime-interface-c...
That shell script runs 'make && make install' on a couple of bundled dependencies, but in principle it could do anything https://github.com/aws/aws-lambda-python-runtime-interface-c...
-
Understanding the AWS Lambda Runtime API
AWS has open-sourced some of the Lambda runtimes you might be using on a day-to-day basis. You can find the Go, Python and Node Lambda runtimes on their GitHub. I encourage you to go out and explore those repositories. There is much to learn about how the code you are writing and deploying is run.
nix-cde
-
The Magic Nix Cache
This is what I'm using with gitlab: https://github.com/takeda/nix-cde/blob/master/contrib/gitlab...
-
Using Nix as an alternative to dev containers in VScode.
I myself use https://github.com/takeda/nix-cde it just wraps other projects in an opinionated way and contains the boiler plate that I would normally use otherwise.
-
As if there weren't enough packaging tools already: mitsuhiko/rye: an experimental alternative to poetry/pip/pipenv/venv/virtualenv/pdm/hatch/…
There's a project that does this with using Nix: https://github.com/takeda/nix-cde (this is a wrapper around https://github.com/nix-community/poetry2nix)
- Docker multi-stage build with Poetry
-
Python 3.11 delivers.
I personally use this: https://github.com/takeda/nix-cde it has the benefit of a reproducible build environment, but unfortunately anything involving Nix has a steep learning curve.
-
The perfect way to handle project-specific developer configs
I use this myself: https://github.com/takeda/nix-cde
-
Asdf – the language tool version manager
I don't use NixOS myself, but have Nix installed on my Mac, and it seems to provide all functionality of package or version managers I needed.
I think though it is more complex because it is a programming language that provides this functionality instead of purpose build tool like asdf.
For my needs I created a framework for development: https://github.com/takeda/nix-cde to avoid cruft of including the same things over and over in my projects.
-
Use `Python -m Pip`
Not an OP, but I became a big fan of using poetry for managing dependencies. For managing python version I started using Nix package manager. It allows to describe all dependencies via code, but with time that code became a boilerplate, so I created this: https://github.com/takeda/nix-cde
It works very well for me so far.
What are some alternatives?
aws-lambda-go - Libraries, samples and tools to help Go developers develop AWS Lambda functions.
hasql-interpolate
aws-lambda-runtime-interface-emulator
nixml - NIX + YAML for easy to use reproducible environments
aws-lambda-nodejs-runtime-interface-client
globus-timer-cli - CLI for interacting with the Timer API
private-pypi - private pypi server
m1-terraform-provider-helper - CLI to support with downloading and compiling terraform providers for Mac with M1 chip
python-appimage - AppImage distributions of Python
asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
portmod
sigstore-python - A Sigstore client for Python