-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26c621f
commit 30475bb
Showing
7 changed files
with
153 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "flask-imp" | ||
version = "5.1.2" | ||
version = "5.2.0" | ||
description = 'A Flask auto importer that allows your Flask apps to grow big.' | ||
authors = [{ name = "David Carmichael", email = "[email protected]" }] | ||
readme = "README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
def api_blueprint_init_py(url_prefix: str, name: str) -> str: | ||
return f"""\ | ||
from flask_imp import ImpBlueprint | ||
from flask_imp.config import ImpBlueprintConfig | ||
bp = ImpBlueprint(__name__, ImpBlueprintConfig( | ||
enabled=True, | ||
url_prefix="/{url_prefix}", | ||
init_session={{"{name}_session_loaded": True}}, | ||
)) | ||
bp.import_resources("routes") | ||
""" | ||
|
||
|
||
def api_blueprint_routes_index_py() -> str: | ||
return """\ | ||
from .. import bp | ||
@bp.route("/", methods=["GET"]) | ||
def index(): | ||
return {"message": "Hello, World!"} | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters