Skip to main content

Implement Firebase Java SDK in python

Project description

sj-firebase-python

Implement Firebase Java SDK in Python

Firebase

Make your app the best it can be

Firebase is an app development platform that helps you build and grow apps and games users love. Backed by Google and trusted by millions of businesses around the world.

Usage

Buildozer Android project

android.gradle_dependencies = io.github.simplejnius:sjfirebase:0.3.0
requirements = https://github.com/SimpleJnius/sj-firebase-python/archive/refs/heads/master.zip

The current version of python-for-android lacks support for incorporating bom dependencies, modifying the classpath, and copying the google-service.json. To address this limitation, a fork of python-for-android has been developed to include these functionalities. To implement these changes in your buildozer.spec file, make adjustments to the specified section using the provided values below:

android.api = 34
android.enable_androidx = True
android.gradle_dependencies = io.github.simplejnius:sjfirebase:1.0.0,
    com.google.firebase:firebase-auth,com.google.firebase:firebase-database,
    com.google.firebase:firebase-firestore,com.google.firebase:firebase-storage,
    com.google.firebase:firebase-analytics
p4a.fork = SimpleJnius
p4a.branch = firebase

Important Note: Upon creating an Android project within your Firebase Console, ensure to transfer the google-service.json file to the same location as your main.py file.

Python(Buildozer) installation

# pip
pip install sjfirebase

# buildozer.spec
requirements = sjfirebase

Python API

ActionCodeSettings

class sjfirebase.jclass.action.ActionCodeSettings

Structure that contains the required continue/state URL with optional Android and iOS bundle identifiers. The stateUrl used to initialize this class is the link/deep link/fallback url used while constructing the Firebase dynamic link.

methods

  • newBuilder
Visit ActionCodeSettings Documentation for more API

SJFirebaseAuthEmai

class sjfirebase.jclass.emailauth.SJFirebaseAuthEmail

The entry point of the Firebase Authentication SDK. First, obtain an instance of this class by calling get_instance

methods

  • check_user_signed_in
  • get_instance
Visit FirebaseAuth Documentation for more API

SJFirebaseDatabase

class sjfirebase.jclass.database.SJFirebaseDatabase

The entry point for accessing a Firebase Database. You can get an instance by calling getInstance. To access a location in the database and read or write data, use get_ref

methods

  • get_db
  • get_ref
Visit FirebaseDatabase Documentation for more API

SJFirebaseFirestore

class sjfirebase.jclass.firestore.SJFirebaseFirestore

methods

  • get_db
Visit FirebaseFirestore Documentation for more API

SJFirebaseUser

class sjfirebase.jclass.user.SJFirebaseUser

Represents a user's profile information in your Firebase project's user database. It also contains helper methods to change or retrieve profile information, as well as to manage that user's authentication state.

methods

  • get_current_user
  • profile_change_request_builder
Visit FirebaseUser Documentation for more API

SJFirebaseStorage

class sjfirebase.jclass.user.SJFirebaseStorage

FirebaseStorage is a service that supports uploading and downloading large objects to Google Cloud Storage. Pass a custom instance of FirebaseApp to get_instance which will initialize it with a storage location (bucket) specified via setStorageBucket.

Otherwise, if you call getReference without a FirebaseApp, the FirebaseStorage instance will initialize with the default FirebaseApp obtainable from get_instance. The storage location in this case will come the JSON configuration file downloaded from the web

methods

  • get_instance
Visit FirebaseStorage Documentation for more API

OnCompleteListener

class sjfirebase.jinterface.google

OnCompleteListener

Listener called when a Task completes.

methods

  • onComplete
Visit OnCompleteListener Documentation for more API

ValueEventListener

class sjfirebase.jinterface.firebase.ValueEventListener

methods

  • onDataChange
  • onCancelled
Visit ValueEventListener Documentation for more API

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sjfirebase-1.4.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

sjfirebase-1.4.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file sjfirebase-1.4.0.tar.gz.

File metadata

  • Download URL: sjfirebase-1.4.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-107-generic

File hashes

Hashes for sjfirebase-1.4.0.tar.gz
Algorithm Hash digest
SHA256 f2103341db80f6cbacd7f23a2d579f0c71793687f595b24d0f760f701f2b6541
MD5 fa0849135705d167e8730115c3aeb378
BLAKE2b-256 c1f01fa628beb0a9a725de240aa4951d87e50de225f91672fd336a5ab7f82085

See more details on using hashes here.

File details

Details for the file sjfirebase-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: sjfirebase-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.0-107-generic

File hashes

Hashes for sjfirebase-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c085cf51651f19588a5c92c8b32818637932ed3b5afe4f44e27fd5d16c89c018
MD5 267bbc7db249b86c81323eff8b974b86
BLAKE2b-256 50dbd289cae681c3af96cb81b518e6a00dd0c1b5a265a84cc964fd09629384f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page