FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
algorithmia-python/Algorithmia/data.py at develop · algorithmiaio/algorithmia-python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
algorithmiaio
/
algorithmia-python
Public
Notifications
You must be signed in to change notification settings
Fork
38
Star
138
Code
Issues
5
Pull requests
4
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
algorithmia-python
/
Algorithmia
/
data.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (17 loc) · 719 Bytes
Breadcrumbs
algorithmia-python
/
Algorithmia
/
data.py
Copy path
File metadata and controls
23 lines (17 loc) · 719 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from
enum
import
Enum
DataObjectType
=
Enum
(
'DataObjectType'
,
'file directory'
)
class
DataObject
(
object
):
def
__init__
(
self
,
data_object_type
):
self
.
data_object_type
=
data_object_type
def
is_file
(
self
):
'''Returns whether object is a file'''
return
self
.
data_object_type
is
DataObjectType
.
file
def
is_dir
(
self
):
'''Returns whether object is a directory'''
return
self
.
data_object_type
is
DataObjectType
.
directory
def
get_type
(
self
):
'''Returns type of this DataObject'''
return
self
.
data_object_type
def
set_attributes
(
self
):
'''Sets attributes about the directory after querying the Data API'''
raise
NotImplementedError
Back
|
FazBrowse Home
|
New Git URL