I am trying to list all members in a column/row format.
For example, column1=email, column2=status
I can add email to the column1 row just fine, but I cannot access the status tag. I am enforced to call each is_* methods until I get a True response and then figure which is_* method returned True and the corresponding tag to the column2 row. Why can't we simply access the tag? Why this overhead of calling each is_* method and why not just add an attribute that returns the tag (I am reluctant to use the _tag attribute).
Please consider use cases where the value of the tag is necessary. For example, let's say I want to export all users/groups to a CSV file with column names that correspond to the tag names and rows that correspond to the value of the tag.
Columns: id, firstname, lastname, email, status
Rows: <id>, X, Y, firstname.lastname@example.org, <active|suspended>
In this case, I just need be to extract the value associated with `status` (i.e. user.status should either evaluate to 'active|suspended|removed'). This is unfortunately not possible with the current specification. Is there any other way to retrieve what I want?
Also, can you explain what following in the SDK implies? What are corresponding get_* methods here? I couldn't find any get_* methods.
This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.
With the Python SDK, you can use the "_tag" property to access the value. It is private, and so not officially supported, but I don't expect it to change. Just make sure you test it whenver you update to a new version of the SDK.
The get_* methods can be used to retrieve the value of the set union field. The field may not always have a typed value to return, so you won't always see the get_* methods on any particular class. You can see an example of one at CreateFolderError.get_path though.
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?