I'm trying to connect to Firebase from App Engine, but I'm getting this error while trying to import Firebase using the Python-Firebase wrapper:
File "C:\_dev\PycharmProjects\myapp\project\project_handler.py", line 31, in <module>
from firebase import firebase
File "C:\_dev\PycharmProjects\myapp\external\firebase\__init__.py", line 3, in <module>
from .async import process_pool
File "C:\_dev\PycharmProjects\myapp\external\firebase\async.py", line 1, in <module>
import multiprocessing
File "C:\PYTHON27\lib\multiprocessing\__init__.py", line 65, in <module>
from multiprocessing.util import SUBDEBUG, SUBWARNING
File "C:\PYTHON27\lib\multiprocessing\util.py", line 40, in <module>
from subprocess import _args_from_interpreter_flags
ImportError: cannot import name _args_from_interpreter_flags
Other people seem to have the same issue, but I couldn't find the answer anywhere.
Overview. Firebase provides the tools and infrastructure you need to develop apps, grow your user base, and earn money. The Firebase Admin Python SDK enables access to Firebase services from privileged environments (such as servers or cloud) in Python.
To connect to Firestore, Firebase first performs authentication. To get the credentials for authentication, click on project settings, and click on “service accounts“. In the “Service accounts” tab, you can find a code snippet for connecting to Google Firebase. Select python as the language and copy the code snippet.
The Firebase SDKs for Cloud Storage use the App Engine default bucket, which means that if you build an App Engine app, you can use the built-in App Engine APIs to share data between Firebase and App Engine.
The python firebase by default uses the multiprocessing package for threading. By default, AppEngine blocks all multiprocessing calls. AppEngine does its own form of multiprocessing by creating task queues and spinning up other instances of your application upon load.
I've created a python-firebase-gae package to deal with this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With