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
Merge requests
!1
Update api.py with find_all method
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update api.py with find_all method
patch-1
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Nelly Barret
requested to merge
patch-1
into
master
5 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
9d5a6d51
1 commit,
5 years ago
1 file
+
14
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
mongiris/api.py
+
14
−
0
Options
@@ -131,6 +131,20 @@ class Mongiris:
@@ -131,6 +131,20 @@ class Mongiris:
doc
=
collection
.
find_one
(
json_query
)
doc
=
collection
.
find_one
(
json_query
)
doc_json
=
Mongiris
.
bson_to_json
(
doc
)
doc_json
=
Mongiris
.
bson_to_json
(
doc
)
return
doc_json
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
):
def
get_iris_from_code
(
self
,
code_iris
):
"""
"""
Loading