Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mongiris
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Duchateau Fabien
mongiris
Commits
9d5a6d51
Commit
9d5a6d51
authored
5 years ago
by
Nelly Barret
Browse files
Options
Downloads
Patches
Plain Diff
Update api.py
parent
6cc4f766
Branches
patch-1
Branches containing commit
No related tags found
1 merge request
!1
Update api.py with find_all method
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mongiris/api.py
+14
-0
14 additions, 0 deletions
mongiris/api.py
with
14 additions
and
0 deletions
mongiris/api.py
+
14
−
0
View file @
9d5a6d51
...
...
@@ -131,6 +131,20 @@ class Mongiris:
doc
=
collection
.
find_one
(
json_query
)
doc_json
=
Mongiris
.
bson_to_json
(
doc
)
return
doc_json
def
find_all
(
self
,
collection
):
"""
Finds all documents in the given collection.
Args:
collection: a string representing the collection name
Returns:
doc_json: a dictionnary representing the documents, or None
"""
doc
=
collection
.
find
()
doc_json
=
Mongiris
.
bson_to_json
(
doc
)
return
doc_json
def
get_iris_from_code
(
self
,
code_iris
):
"""
...
...
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