Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trenddit-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raj Singh Gogia
trenddit-backend
Commits
a6fe26f6
Commit
a6fe26f6
authored
2 years ago
by
Harkanwar Singh Waraich
Browse files
Options
Downloads
Patches
Plain Diff
Updated gitignore
parent
c0ca34c3
No related branches found
No related tags found
1 merge request
!2
Firebase init
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+4
-2
4 additions, 2 deletions
.gitignore
firebase_tools/trenddit-db-init.py
+17
-0
17 additions, 0 deletions
firebase_tools/trenddit-db-init.py
with
21 additions
and
2 deletions
.gitignore
+
4
−
2
View file @
a6fe26f6
...
...
@@ -127,5 +127,7 @@ dmypy.json
# Pyre type checker
.pyre/
firebase_tools/trenddit-db-init.py
tokens.txt
\ No newline at end of file
firebase_tools/trenddit-db-cred.py
tokens.txt
.DS_Store
\ No newline at end of file
This diff is collapsed.
Click to expand it.
firebase_tools/trenddit-db-init.py
0 → 100644
+
17
−
0
View file @
a6fe26f6
import
firebase_admin
from
firebase_admin
import
credentials
from
firebase_admin
import
firestore
# Use a service account.
cred
=
credentials
.
Certificate
(
'
./firebase_tools/trenddit-db-cred.json
'
)
app
=
firebase_admin
.
initialize_app
(
cred
)
db
=
firestore
.
client
()
docs
=
db
.
collection
(
u
'
sample1
'
).
get
()
for
doc
in
docs
:
print
(
f
'
{
doc
.
id
}
=>
{
doc
.
to_dict
()
}
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment