Documentation for python-stdnet's DEVELOPMENT version. Get the release docs here.

Structure-Fields

The structure fields are the networked equivalent of data-structures such as sets, hash-tables, lists and so forth. They are associated with an instance of a StdModel or, for redis backend only, with a StdModel class.

List

Backends: redis, mongodb

default encoder: stdnet.utils.encoders.NumericDefault.

Methods

The following api methods are available for a ListField via the List structure:

Set

Backends: redis, mongodb

default encoder: stdnet.utils.encoders.NumericDefault.

Methods

The following api methods are available for a Set and SetField:

Zset

Backends: redis

default encoder: stdnet.utils.encoders.NumericDefault.

Methods

The following api methods are available for a Zset and SetField with SetField.ordered attribute set to True:

Hash table

Backends: redis

default field encoder: stdnet.utils.encoders.Default.

default value encoder: stdnet.utils.encoders.NumericDefault.

Methods

The following api methods are available for a HashTable and HashField:

Timiseries

Backends: redis

default field encoder: stdnet.utils.encoders.DateTimeConverter.

default value encoder: stdnet.utils.encoders.Json.

A timeseries is an ordered associative container where entries are ordered with respect times and each entry is associated with a time. There are two types of timeseries in stdnet: the stdnet.odm.TS which accepts any type of entry and the stdnet.apps.columnts.ColumnTS, a specialized stdnet.odm.TS for multivariate numeric timeseries.

The TS has a simple api:

from datetime import date
from stdnet import odm

session = ...
with session.begin() as t:
    ts = t.add(odm.TS())
    ts[date(2013,1,1)] = "New year's day!"

Methods

The following api methods are available for a TS and TimeSeriesField:

Table Of Contents

Previous topic

Related Models

Next topic

Field Generator

This Page