-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
with `charmcraft init --profile flask-framework`
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
venv/ | ||
build/ | ||
*.charm | ||
.tox/ | ||
.coverage | ||
__pycache__/ | ||
*.py[cod] | ||
.idea | ||
.vscode/ |
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,18 @@ | ||
name: charmhub-io | ||
|
||
type: charm | ||
|
||
bases: | ||
- build-on: | ||
- name: ubuntu | ||
channel: "22.04" | ||
run-on: | ||
- name: ubuntu | ||
channel: "22.04" | ||
|
||
summary: The charm for the charmhub.io website | ||
|
||
description: The charm for the charmhub.io website, built with PaaS app charmer | ||
|
||
extensions: | ||
- flask-framework |
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 @@ | ||
paas-app-charmer==1.* |
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,30 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2024 Moe Isk | ||
# See LICENSE file for licensing details. | ||
|
||
"""Flask Charm entrypoint.""" | ||
|
||
import logging | ||
import typing | ||
|
||
import ops | ||
|
||
import paas_app_charmer.flask | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class FlaskCharm(paas_app_charmer.flask.Charm): | ||
"""Flask Charm service.""" | ||
|
||
def __init__(self, *args: typing.Any) -> None: | ||
"""Initialize the instance. | ||
Args: | ||
args: passthrough to CharmBase. | ||
""" | ||
super().__init__(*args) | ||
|
||
|
||
if __name__ == "__main__": | ||
ops.main.main(FlaskCharm) |