Skip to content

Commit

Permalink
Update Flask related Information
Browse files Browse the repository at this point in the history
  • Loading branch information
app-generator committed Sep 30, 2023
1 parent 5fe6c05 commit f88b6ee
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 27 deletions.
6 changes: 6 additions & 0 deletions docs/glossary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ sidebar_label : Glossary

Docker is an open-source platform and set of tools designed to simplify the development, deployment, and management of applications through containerization.

## F

**[Flask](/content/what-is/flask/)**

Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications.

## H

**[HTMX](/content/what-is/htmx/)**
Expand Down
12 changes: 5 additions & 7 deletions docs/technologies/flask/01-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ In this presentation, I'll provide you with an overview of Flask, its key featur

![Getting Started with Flask - Tutorial provided by AppSeed](https://github-production-user-asset-6210df.s3.amazonaws.com/51070104/268566349-c41e65a5-2ab9-4b54-8cbc-350ab6da746c.png)

## What is Flask?
## What is Flask

- Flask is a micro web framework for Python.
- It's designed to be simple, lightweight, and easy to use.
- Flask provides the essentials for building web applications without imposing too much structure or complexity.

## Key Features of Flask
## Key Features of Flask

**Minimalistic**

Expand Down Expand Up @@ -62,7 +62,7 @@ Comes with a built-in development server for testing your application locally.
Flask's simplicity makes it a great choice for beginners.

## Code Sample
## Code Sample

Let's look at some basic Flask code samples to get a feel for how it works.

Expand Down Expand Up @@ -128,12 +128,10 @@ Its simplicity and flexibility make it a great choice for a wide range of projec

To dive deeper into Flask, explore its documentation (https://flask.palletsprojects.com/) and consider exploring extensions and advanced topics like authentication, database integration, and deployment.

<br />

## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder

6 changes: 2 additions & 4 deletions docs/technologies/flask/01-releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ This page presensts the history of Flask starting from the latest versions.
- Improved request and response objects.
- CSRF enhancements.

<br />

## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
7 changes: 2 additions & 5 deletions docs/technologies/flask/async-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,16 @@ if __name__ == '__main__':

In this example, the gevent-based WSGIServer enables multiple requests to be handled concurrently without blocking.


## ✅ In Summary

Please note that asynchronous programming is typically used for I/O-bound operations to improve the responsiveness and efficiency of your web application.
Flask is well-suited for such use cases when combined with appropriate asynchronous libraries like `asyncio` or gevent.

However, for CPU-bound tasks, you might want to explore other asynchronous frameworks like FastAPI, which has native support for asynchronous programming.

<br />

## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
79 changes: 79 additions & 0 deletions docs/technologies/flask/blueprints.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title : What is a Flask Blueprint
sidebar_label : Blueprints
---

# What is a Flask Blueprint

<SubHeading>Flask Blueprints, a short introduction.</SubHeading>

A **Flask Blueprint** is a way to organize a Flask web application into smaller, reusable components or modules.
It's a feature provided by the `Flask Web framework` to help you structure your application as it grows in complexity.

![What is a Flask Blueprint - Tutorial provided by AppSeed.](https://user-images.githubusercontent.com/51070104/268566349-c41e65a5-2ab9-4b54-8cbc-350ab6da746c.png)

**Blueprints** allow you to group related routes, views, templates, and static files into separate modules, making your Flask application more organized and maintainable.

> Here are some **key aspects of Flask Blueprints**
## **Modular Organization**

Blueprints enable you to break down your Flask application into smaller, self-contained modules.

Each module represents a specific part of your application, such as user authentication, blog management, or API endpoints.

## **Reusability**

Once defined, a Blueprint can be easily reused in different parts of your application or even in other Flask projects. This promotes code reuse and modularity.

## **Independence**

Blueprints are independent of the main application. They can be developed, tested, and maintained separately from the core application. This separation of concerns helps in keeping your codebase clean and manageable.

## **Routing**

Blueprints allow you to define routes, URL patterns, and view functions just like you would in the main Flask application. These routes are scoped under the Blueprint, making it easy to organize and maintain a consistent URL structure.

## **Templates**

You can associate templates with a Blueprint. This means that you can define template files specific to a Blueprint, allowing for better organization of your HTML files.

## **Static Files**

Blueprints can also include static files (CSS, JavaScript, images, etc.), and Flask will automatically handle their routing and serving.

## **Code Sample**

Here's an example of how to define and register a Flask Blueprint:

```python
from flask import Blueprint, render_template

# Create a Blueprint instance
blog_blueprint = Blueprint('blog', __name__)

# Define a route within the Blueprint
@blog_blueprint.route('/')
def index():
return render_template('blog/index.html')

# Register the Blueprint with the Flask application
app.register_blueprint(blog_blueprint, url_prefix='/blog')
```

In this example, we create a Blueprint called "blog," define a route for the root URL ('/'), and associate a template with it.

We then register the Blueprint with the Flask application using `app.register_blueprint()`.

## ✅ In Summary

By using Blueprints, you can structure your Flask application in a more organized and maintainable way, especially as it grows in size and complexity.

This modular approach also makes it easier for multiple developers to work on different parts of the application simultaneously.

## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
4 changes: 2 additions & 2 deletions docs/technologies/flask/integrate-celery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ Make sure to adapt the code and configurations to your specific needs and securi
## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
5 changes: 2 additions & 3 deletions docs/technologies/flask/multitenancy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ The specific implementation may vary depending on your project's requirements an
## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder

4 changes: 2 additions & 2 deletions docs/technologies/flask/production-checklist.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,6 @@ Here are some of the key takeaways from this article:
## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
4 changes: 2 additions & 2 deletions docs/technologies/flask/run-on-replit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,6 @@ We were able to successfully start the Flask application and view the dashboard.
## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
4 changes: 2 additions & 2 deletions docs/technologies/flask/socketio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,6 @@ Socket.IO is a powerful tool that can be used to create a variety of real-time a
## ✅ Resources

- 👉 Access [AppSeed](https://appseed.us/) and start your next project
- 👉 [Deploy Projects on Aws, Azure and Digital Ocean](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create an amazing landing page with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Deploy Projects on Aws, Azure, and DO](https://www.docs.deploypro.dev/) via **DeployPRO**
- 👉 Create landing pages with [Simpllo, an open-source site builder](https://www.simpllo.com/)
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder

0 comments on commit f88b6ee

Please sign in to comment.