File tree 8 files changed +142
-0
lines changed
8 files changed +142
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "projects": {
3
+ "default": "python-functions-testing"
4
+ }
5
+ }
Original file line number Diff line number Diff line change
1
+ # Logs
2
+ logs
3
+ * .log
4
+ npm-debug.log *
5
+ yarn-debug.log *
6
+ yarn-error.log *
7
+ firebase-debug.log *
8
+ firebase-debug. * .log *
9
+
10
+ # Firebase cache
11
+ .firebase /
12
+
13
+ # Firebase config
14
+
15
+ # Uncomment this if you'd like others to create their own Firebase project.
16
+ # For a team working on the same Firebase project(s), it is recommended to leave
17
+ # it commented so all members can deploy to the same project(s) in .firebaserc.
18
+ # .firebaserc
19
+
20
+ # Runtime data
21
+ pids
22
+ * .pid
23
+ * .seed
24
+ * .pid.lock
25
+
26
+ # Directory for instrumented libs generated by jscoverage/JSCover
27
+ lib-cov
28
+
29
+ # Coverage directory used by tools like istanbul
30
+ coverage
31
+
32
+ # nyc test coverage
33
+ .nyc_output
34
+
35
+ # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
36
+ .grunt
37
+
38
+ # Bower dependency directory (https://bower.io/)
39
+ bower_components
40
+
41
+ # node-waf configuration
42
+ .lock-wscript
43
+
44
+ # Compiled binary addons (http://nodejs.org/api/addons.html)
45
+ build /Release
46
+
47
+ # Dependency directories
48
+ node_modules /
49
+
50
+ # Optional npm cache directory
51
+ .npm
52
+
53
+ # Optional eslint cache
54
+ .eslintcache
55
+
56
+ # Optional REPL history
57
+ .node_repl_history
58
+
59
+ # Output of 'npm pack'
60
+ * .tgz
61
+
62
+ # Yarn Integrity file
63
+ .yarn-integrity
64
+
65
+ # dotenv environment variables file
66
+ .env
Original file line number Diff line number Diff line change
1
+ # Required to avoid a 'duplicate modules' mypy error
2
+ # in monorepos that have multiple main.py files.
3
+ # https://github.com/python/mypy/issues/4008
Original file line number Diff line number Diff line change
1
+ {
2
+ "functions" : [
3
+ {
4
+ "source" : " functions" ,
5
+ "codebase" : " default" ,
6
+ "ignore" : [
7
+ " venv"
8
+ ]
9
+ }
10
+ ]
11
+ }
Original file line number Diff line number Diff line change
1
+ # pyenv
2
+ .python-version
3
+
4
+ # Installer logs
5
+ pip-log.txt
6
+ pip-delete-this-directory.txt
7
+
8
+ # Environments
9
+ .env
10
+ .venv
11
+ venv /
12
+ venv.bak /
13
+ __pycache__
Original file line number Diff line number Diff line change
1
+ # Flask & Firebase Functions Example
2
+
3
+ Getting started locally:
4
+
5
+ ``` bash
6
+ python3.10 -m venv venv
7
+ source venv/bin/activate
8
+ pip3 install --upgrade pip
9
+ python3.10 -m pip install -r requirements.txt
10
+ ```
Original file line number Diff line number Diff line change
1
+ """
2
+ Example Firebase Functions with Flask.
3
+ """
4
+
5
+ from flask import Flask
6
+ from functions_wrapper import entrypoint
7
+
8
+ from firebase_functions import https_fn
9
+
10
+ app = Flask (__name__ )
11
+
12
+
13
+ @app .route ("/hello" )
14
+ def hello ():
15
+ return "Hello!"
16
+
17
+
18
+ @app .route ("/world" )
19
+ def world ():
20
+ return "Hello World!"
21
+
22
+
23
+ @https_fn .on_request ()
24
+ def httpsflaskexample (request ):
25
+ return entrypoint (app , request )
Original file line number Diff line number Diff line change
1
+ # Not published yet,
2
+ # firebase-functions-python >= 0.0.1
3
+ # so we use a relative path during development:
4
+ # ./../../../
5
+ # Or switch to git ref for deployment testing:
6
+ git+https://github.com/firebase/firebase-functions-python.git@main#egg=firebase-functions
7
+
8
+ firebase-admin >= 6.0.1
9
+ functions_wrapper >= 1.0.1
You can’t perform that action at this time.
0 commit comments