AWS Microservice Bootstrap Code for Flask
This project contains bootstrap code to speed up the development of AWS based microservices built with Flask.
This project is an extension of microgue: https://pypi.org/project/microgue/
Working On Microflask
Repo: https://bitbucket.org/michaelhudelson/microflask/src/main
Clone: git clone https://bitbucket.org/michaelhudelson/microflask/src/main
Requirements
- Python 3.7+
Pre-Setup
-
Make sure you have an IAM user created with correct permissions in your AWS account
-
Create an Access Key on that user
-
Install awscli
pip install awscli -
Add that Access Key with
aws configure -
Verify you are using the correct Access Key with
aws configure list -
You can also verify by looking at the file
~/.aws/credentials
-
Install Microflask
pip install microflask
Flask Setup (Optional)
- Put the following code in the app.py file in the root of the project
import logging
from microflask.abstract_app import AbstractApp
logging.basicConfig()
class App(AbstractApp):
pass
app = App().app
- In the terminal run the following commands
export PYTHONUNBUFFERED=1
export FLASK_DEBUG=1
flask run
Distribution
# update version in setup.py
# commit and push changes
git add .
git commit -m "v1.0.X"
git push origin main
# tag the commit and push
git tag -a v1.0.X -m "Release v1.0.X"
git push --tags
# package with:
source venv/bin/activate
python setup.py sdist bdist_wheel
# https://pypi.org/project/microflask/
# upload to pypi with:
python -m twine upload dist/*
# OPTIONAL
# https://test.pypi.org/project/microflask/
# upload to test pypi with:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Backlog
- create as package
Metadata
Release files for microflask 1.0.0
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 |
|---|---|---|---|---|
| microflask-1.0.0.tar.gz | 4.7 kB | Without provenance | Details for microflask-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| microflask-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for microflask-1.0.0-py3-none-any.whl |
Total release size: 10.1 kB
Release files / microflask-1.0.0.tar.gz
| Download URL | microflask-1.0.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d1f3e8a94156d8dcf2f7fe2bb8a0c6cbd03e30759787309f566aac5dbfba5c2
|
|
BLAKE2b-256 checksum How to use checksums |
2c57ca7d620607cc8a569088c05c0b4b4afbcbbc836cfeccf41bc05df24d7b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Release files / microflask-1.0.0-py3-none-any.whl
| Download URL | microflask-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76ae51f8148f6a8f51bc4441502df08d772e1f53ead58db2259488333fbefd04
|
|
BLAKE2b-256 checksum How to use checksums |
7985b4e7da5b45bad962684e8346d6ff85610c49f23c567555d2a1013a77b9bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Security for microflask 1.0.0
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.