How to structure Flask applications part 2 - Growing up

Posted on Fri 16 October 2020 in python • Tagged with python, flask, webdev

My first introduction to Flask was Miguel Grinberg's original Flask Megatutorial. After using Django as my framework of choice for several years. Miguel's simple use of Flask allowed me to see just far enough under the hood that I started understanding much more of the web stack, hidden in some …


Continue reading

How to structure Flask applications part 1 - Small Apps

Posted on Fri 02 October 2020 in python • Tagged with python, flask, webdev

One of the benefits of using Flask is it is straightforward to get an application up and running. When you are first starting, you can create your application with a single file. The structure of the application is left entirely up to the developer.

Starting with a single file application …


Continue reading

Github apps: Securing webhooks with Python in Flask

Posted on Wed 15 January 2020 in github apps • Tagged with python, flask, github, conveyor, webdev, webhooks

Once you have your Github webhooks working you will want to add a bit of security to make sure that the requests are actually coming from Github. One way to do this is to verify the signature Github sends matches the digest of the message.

Here is an example of …


Continue reading

Github apps: Receiving webhooks with Flask

Posted on Tue 14 January 2020 in github apps • Tagged with python, flask, github, conveyor, webdev, webhooks

Once you have your Github app created you can start receiving webhooks when events occur.

If you want to test this locally you can use an ngrok.io address to route the request to your local computer. Instructions on how to do that can be found at https://developer.github …


Continue reading

Deleting a single certbot certificate

Posted on Thu 10 October 2019 in github apps • Tagged with webdev, certbot, letsencrypt

# run the following command 
certbot delete --cert-name domain.com

Why would you want to do this? In my case I had created certificates for www.conveyor.dev and conveyor.dev. I decided to use a redirect for traffic to conveyor.dev to www.conveyor.dev, by doing that the certbot …


Continue reading

Github apps: Creating and installing an app with Flask

Posted on Sat 21 September 2019 in github apps • Tagged with python, flask, github, conveyor, webdev, webhooks

Create a Github app to integrate with Github

demo

Using a Github app is the preferred way integrate with Github. By creating a Github app you can give your users more granular control of what you have access to. By transitioning Conveyor.dev to use a Github app the level of …


Continue reading

Create a navigation sidebar with flask

Posted on Wed 28 August 2019 in flask • Tagged with python, flask, sidebar, conveyor, webdev

Sometimes pages grow to a point that the need a little help in order to keep it intuitive for the user. I want to share one way that I have been able to keep pages organized and intuitive to the user by using a sidebar with Flask. No javascript involved …


Continue reading