Skip to content

Commit

Permalink
docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Aug 8, 2019
1 parent dc60d19 commit 8870a21
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions isogeo_pysdk/api/routes_feature_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ def import_from_dataset(
:param Metadata metadata_source: metadata from which to import the attributes
:param Metadata metadata_dest: metadata where to import the attributes
:param str mode: mode of import, defaults to "add":
:param str mode: mode of import, defaults to 'add':
- 'add': add the attributes except those with a duplicated name
- 'update': update only the attributes with the same name
- 'update_or_add': update the attributes with the same name or create
Expand All @@ -336,11 +337,16 @@ def import_from_dataset(
:raises ValueError: if mode is not one of accepted value
:Example:
>>> # get the metadata objects
>>> md_source = isogeo.metadata.get(METADATA_UUID_SOURCE)
>>> md_dest = isogeo.metadata.get(METADATA_UUID_DEST)
>>> # launch import
>>> isogeo.metadata.attributes.import_from_dataset(md_source, md_dest, "add")
.. code-block:: python
# get the metadata objects
md_source = isogeo.metadata.get(METADATA_UUID_SOURCE)
md_dest = isogeo.metadata.get(METADATA_UUID_DEST)
# launch import
isogeo.metadata.attributes.import_from_dataset(md_source, md_dest, "add")
"""
accepted_modes = ("add", "update", "update_or_add")

Expand Down

0 comments on commit 8870a21

Please sign in to comment.