@@ -62,7 +62,7 @@ firebase.setURL(URL)
6262Set the current Firebase URL.
6363### get
6464``` python
65- firebase.get(PATH , DUMP , bg = False , id = 0 , cb = None )
65+ firebase.get(PATH , DUMP , bg = False , id = 0 , cb = None , limit = False )
6666```
6767Takes the given storage location ` PATH ` , gets the data from there and stores it as ` DUMP ` . The data can later be read out by ` firebase.[DUMP] ` .
6868 - Optional run in the background with the keyword ` bg ` .
@@ -75,9 +75,21 @@ Takes the given storage location `PATH`, gets the data from there and stores it
7575 firebase.get(" testtag1" , " VAR1" , bg = True , id = 0 , cb = (hereweare, (" testtag1" , " 0" , " VAR1" )))
7676 firebase.get(" testtag2" , " VAR2" , bg = True , id = 1 , cb = (hereweare, (" testtag2" , " 1" , " VAR2" ))) # runs at the same time
7777 ```
78+ - 🆕 Limit the depth of the data to 1 with `limit` ⚠️ ONLY USE True / False (not 1 / 0 ).
79+ - Example:
80+
81+ 
82+ ```python
83+ firebase.get(" a" , " VAR1" )
84+ print (firebase.VAR1 )
85+ # returns {'testlarge2': 'KJIHGFEDCBA', 'lol': 'ok', 'a': {'-MY_ntFnAhiTYygcraC6': [2, 2], '-MY_novcmzHOyexwij8B': '2', '-MY_nlKoV7jcYbTJMpzT': '2'}, 'testlarge1': 'ABCDEFGHIJK', 'testtag1': 1, 'testtag2': 2}
86+ firebase.get(" a" , " VAR2" , limit = True )
87+ print (firebase.VAR2 )
88+ # returns {'testlarge2': True, 'lol': True, 'testtag2': True, 'testlarge1': True, 'testtag1': True, 'a': True}
89+ ```
7890# ## getfile
7991```python
80- firebase.get(PATH , FILE , bg = False , id = 0 , cb = None )
92+ firebase.get(PATH , FILE , bg = False , id = 0 , cb = None , limit = False )
8193```
8294Takes the given storage location ` PATH ` , gets the data from there and stores it as file at the location ` FILE ` . Recommeded to download larger amounts of data to avoid ram overflow.
8395 - Optional run in the background with the keyword ` bg ` .
@@ -89,9 +101,10 @@ Takes the given storage location `PATH`, gets the data from there and stores it
89101 LOCAL_FILE = open (str (filename))
90102 print (" \n name: " ,str (name)+ " , id: " + str (id )+ " , value: " + str (LOCAL_FILE .read()))
91103 LOCAL_FILE .close()
92- firebase.getfile(" testlarge1" , " FILE1.txt" , id = 0 , cb = (herewefile, (" testlarge1" , " 0" , " FILE1.txt" )))
93- firebase.getfile(" testlarge2" , " FILE2.txt" , id = 1 , cb = (herewefile, (" testlarge2" , " 1" , " FILE2.txt" ))) # runs at the same time
104+ firebase.getfile(" testlarge1" , " FILE1.txt" , id = 0 , bg = 1 , cb = (herewefile, (" testlarge1" , " 0" , " FILE1.txt" )))
105+ firebase.getfile(" testlarge2" , " FILE2.txt" , id = 1 , bg = 1 , cb = (herewefile, (" testlarge2" , " 1" , " FILE2.txt" ))) # runs at the same time
94106 ```
107+ - 🆕 Limit the depth of the data to 1 with `limit` ⚠️ ONLY USE True / False (not 1 / 0 ).
95108# ## put
96109```python
97110firebase.put(PATH , DATA , bg = True , id = 0 , cb = None )
0 commit comments