You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-21Lines changed: 24 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,53 +62,52 @@ firebase.setURL(URL)
62
62
Set the current Firebase URL.
63
63
### get
64
64
```python
65
-
firebase.get(PATH, DUMP, bg=False, id=0)
65
+
firebase.get(PATH, DUMP, bg=False, id=0, cb=None)
66
66
```
67
67
Takes 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]`.
68
68
- Optional run in the background with the keyword `bg`.
69
69
- Set socket id with the keyword `id`. This makes it possible to establish multiple connections to the server instead of just one. Recommended if you know what you are doing, only makes sense if the command is running in the background.
70
+
- 🆕 Set an callback function after getting the `DATA`.
70
71
- Example:
71
72
```python
72
-
firebase.get("testtag1", "VAR1", bg=True, id=0)
73
-
firebase.get("testtag2", "VAR2", bg=True, id=1) #runs at the same time
74
-
time.sleep(10) #Do some other things, or wait a bit, or use bg=False with id=0
firebase.get("testtag2", "VAR2", bg=True, id=1, cb=(hereweare, ("testtag2", "1", "VAR2"))) #runs at the same time
76
77
```
77
78
### getfile
78
79
```python
79
-
firebase.get(PATH, FILE, bg=False, id=0)
80
+
firebase.get(PATH, FILE, bg=False, id=0, cb=None)
80
81
```
81
82
Takes 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.
82
83
- Optional run in the background with the keyword `bg`.
83
84
- Set socket id with the keyword `id`. This makes it possible to establish multiple connections to the server instead of just one. Recommended if you know what you are doing, only makes sense if the command is running in the background.
85
+
- 🆕 Set an callback function after getting the `DATA`.
84
86
- Example:
85
87
```python
86
-
firebase.getfile("testlarge1", "FILE1.txt", id=0)
87
-
firebase.getfile("testlarge2", "FILE2.txt", id=1) #runs at the same time
88
-
time.sleep(20) #Do some other things, or wait a bit, or use bg=False with id=0
firebase.getfile("testlarge2", "FILE2.txt", id=1, cb=(herewefile, ("testlarge2", "1", "FILE2.txt"))) #runs at the same time
96
94
```
97
95
### put
98
96
```python
99
-
firebase.put(PATH, DATA, bg=True, id=0)
97
+
firebase.put(PATH, DATA, bg=True, id=0, cb=None)
100
98
```
101
99
Takes the given storage location `PATH` and uploads the given value `DATA` there.
102
100
- Optional run in the background with the keyword `bg`.
103
101
- Set socket id with the keyword `id`. This makes it possible to establish multiple connections to the server instead of just one. Recommended if you know what you are doing, only makes sense if the command is running in the background. (Example at get)
102
+
- 🆕 Set an callback function after getting the `DATA`.
104
103
- Example:
105
104
```python
106
105
firebase.put("testtag1", "1", id=0)
107
106
firebase.put("testtag2", "2", id=1) #runs at the same time
- Optional run in the background with the keyword `bg`.
121
120
- Set socket id with the keyword `id`. This makes it possible to establish multiple connections to the server instead of just one. Recommended if you know what you are doing, only makes sense if the command is running in the background. (Example at get)
121
+
- 🆕 Set an callback function after patching the `DATA`.
Takes the given storage location `PATH` and adds the given value `DATA` there, the randomly generated tag can be optionally stored in the DUMP variable.
- Optional run in the background with the keyword `bg`.
136
136
- Set socket id with the keyword `id`. This makes it possible to establish multiple connections to the server instead of just one. Recommended if you know what you are doing, only makes sense if the command is running in the background. (Example at get)
137
+
- Retuns the tag under which the data was saved.
138
+
- 🆕 Set an callback function after adding the `DATA`.
137
139
### delete
138
140
```python
139
-
firebase.delete(PATH, bg=True, id=0)
141
+
firebase.delete(PATH, bg=True, id=0, cb=None)
140
142
```
141
143
Takes the given storage location `PATH` deletes the data there.
142
144
- Optional run in the background with the keyword `bg`.
143
145
- Set socket id with the keyword `id`. This makes it possible to establish multiple connections to the server instead of just one. Recommended if you know what you are doing, only makes sense if the command is running in the background. (Example at get)
146
+
- 🆕 Set an callback function after deleting the `DATA`.
0 commit comments