Get all datastreams that belong to this object.

        Returns a dictionary; key is datastream id, value is an :class:`ObjectDatastream`
        for that datastream.

        :rtype: dictionary
170471
def _get_datastreams(self):
        
        if self._create:
            # FIXME: should we default to the datastreams defined in code?
            return {}
        else:
            # NOTE: can be accessed as a cached class property via ds_list
            r = self.api.listDatastreams(self.pid)
            dsobj = parse_xml_object(ObjectDatastreams, r.content, r.url)
            return dict([(ds.dsid, ds) for ds in dsobj.datastreams])
1153930
def objects(self):
        
        data = self._get_raw_objects()

        return PaginatedList.make_paginated_list(data, self._client, TaggedObjectProxy,
                                                 page_url=type(self).api_endpoint.format(**vars(self)))
440943
def get_datastream(self, datastream):
        
        response = self.http.get('/Datastream/' + str(datastream))
        datastream = Schemas.Datastream(datastream=response)
        return datastream
1205053
def getDictionary(self):
		
		if os.path.exists(self.jsonFile):
			return json.loads(Utility.readFile(self.jsonFile))
		else:
			return {}
194615
def as_dict(self):
        
        d = MSONable.as_dict(self)
        d["data"] = self.data.tolist()
        return d
1055746
def _all_datatable_data(self):
        
        dtbl = self.datatable
        objs = object_session(self)
        imcols = [dtbl.c.indx, dtbl.c.final, dtbl.c.override_feed000, dtbl.c.failsafe_feed999]
        cols = imcols[:3] + [c for c in dtbl.c if c not in (imcols)] + [imcols[3]]
        if isinstance(dtbl, Table):
            return objs.query(*cols).order_by(dtbl.c.indx).all()
        else:
            raise Exception("Symbol has no datatable")
101818
def items(self, *args, **kwargs):
        
        return self.get_stream()(self.get_object(*args, **kwargs))
802771
def get_all(self):
        
        self.optional_params = {}
        self.endpoints = self._ENDPOINTS[:10]
        json_data = self.fetch(fmt_p=no_pandas)
        self.endpoints = self._ENDPOINTS[10:20]
        json_data_2 = self.fetch(fmt_p=no_pandas)
        for symbol in self.symbols:
            if symbol not in json_data:
                raise IEXSymbolError(symbol)
            json_data[symbol].update(json_data_2[symbol])
        return json_data[self.symbols[0]] if self.n_symbols == 1 else json_data
487407
def all(self):
        

        if self._stream:
            return chain.from_iterable(self._get_streamed_response())

        return self._get_buffered_response()[0]
305118
def dump(self):
        

        return {
            u'storage_data': [x.asdict() for x in self.storage_data],
            u'streaming_data': [x.asdict() for x in self.streaming_data]
        }
717605
def find_streams(self, **kwargs):
        
        found = {}

        if 'name' in kwargs:
            name = kwargs.pop('name')
        else:
            name = None

        for stream_id, stream in self.streams.items():
            if name is not None and stream_id.name != name:
                continue

            d = dict(stream_id.meta_data)
            if all(k in d and d[k] == str(v) for k, v in kwargs.items()):
                found[stream_id] = stream
        return found
1153719
def to_dict(self):
        
        with self._lock:
            result = {}
            if self._gpayload:
                result.update(self._gpayload)
            if self._tpayload:
                result.update(getattr(self._tpayload, "context", {}))
            return result
926061
def get_datastreams(self):
        
        datastreams = []
        response = self.http.get('/Datastream')
        for datastream in response:
            datastreams.append(Schemas.Datastream(datastream=datastream))
        return datastreams
235119
def to_dict(self):
        
        data = {
            'url': self.url,
            'encodingRate': self.encoding_rate,
            'frameHeight': self.frame_height,
            'frameWidth': self.frame_width,
            'size': self.size,
            'remoteUrl': self.remote_url,
            'remoteStream': self.remote_stream_name,
            'videoDuration': self.video_duration,
            'videoCodec': self.video_codec}
        [data.pop(key) for key in data.keys() if data[key] is None]
        return data
356693
private XStream getXStreamObject()
    {
        if (xStream == null)
        {
            XStream stream = new XStream();
            stream.alias("clientProperties", ClientProperties.class);
            stream.alias("dataStore", ClientProperties.DataStore.class);
            stream.alias("schema", ClientProperties.DataStore.Schema.class);
            stream.alias("table", ClientProperties.DataStore.Schema.Table.class);
            stream.alias("dataCenter", ClientProperties.DataStore.Schema.DataCenter.class);
            stream.alias("connection", ClientProperties.DataStore.Connection.class);
            stream.alias("server", ClientProperties.DataStore.Connection.Server.class);
            return stream;
        }
        else
        {
            return xStream;
        }
    }
90218
def _data(self, copy=False):
        
        data = {}
        for key, obj in vars(self).items():
            if isinstance(obj, (pd.Series, pd.DataFrame, pd.SparseSeries, pd.SparseDataFrame)):
                if copy:
                    data[key] = obj.copy(deep=True)
                else:
                    data[key] = obj
        return data
318862
def _get_all(self):
        
        return [self._to_dict(row) for row in models.User.objects.all()]