If you are viewing this on GitHub, I recommend you check out the hosted docs instead as not everything here is in standard Markdown.
!!!warning While this cookiecutter is functional as-is, the documentation for this project is far from complete.
For generating FastAPI projects to be hosted on AWS Lambda using the Serverless framework. Includes everything that Triax uses for its internal projects like:
- CI/CD with CircleCI
- Private PyPI repos (e.g. on [Gemfury])
- Generation of Angular client libraries using OpenAPI Generator
- A bunch of security best-practices
- Install cookiecutter. I recommend installing with pipx like
pipx install cookiecutter
. - Run this cookiecutter with
cookiecutter gh:triaxtec/fastapi-serverless-cookiecutter
- Fill in the variables!
!!!warning Running a cookiecutter executes arbitrary Python code. Only run cookiecutters than you trust!
When you run this cookiecutter, you will be prompted to provide all of these values:
The name of the Python-installable package and top level directory that will be generated. By convention, this should be in kebab-case where each word is separated by a "-".
The name of the module where all your Python source code will go. This one should be snake_case
where each word is separated by an underscore. The default is the same as package_name
but in snake_case.
The URL to your private PyPI repository. If you aren't using one, you can leave this at the default. You'll have to remove the relevant pieces of pyproject.toml and CircleCI Config.
The URL to your private NPM repository. If you aren't using one, you can leave this at the default. You'll have to remove the relevant pieces of Angular Client Config and CircleCI Config.
- Explore the generated example in GitHub or generate your own and start playing!
- See Next Steps for setting up CircleCI, AWS, etc. to work with it.
- Check out What You Get for a walkthrough of everything that will be generated by this cookiecutter.
{!./hyperlinks.md!}