Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(18)  |  Call(15)  |  Derive(0)  |  Import(3)
Mapping field for integer values.

src/a/s/astm-0.5.0/astm/omnilab/client.py   astm(Download)
"""
 
from astm.mapping import (
    Component, ConstantField, ComponentField, IntegerField, DateTimeField,
    RepeatedComponentField, SetField, TextField, NotUsedField
#:
PatientAge = Component.build(
    IntegerField(name='value'),
    SetField(name='unit', values=('years', 'months', 'days'))
)

src/a/s/astm-0.5.0/astm/omnilab/server.py   astm(Download)
 
from astm.server import BaseRecordsDispatcher
from astm.mapping import (
    Component, ConstantField, ComponentField, DateTimeField, IntegerField,
    SetField, TextField, NotUsedField, DateField
    """
    abnormal_flag = SetField(
        field=IntegerField(),
        length=4,
        values=(0, 1, 2, 3,

src/a/s/astm-0.5.0/astm/omnilab/common.py   astm(Download)
 
from astm import __version__
from astm.mapping import (
    Component, ConstantField, ComponentField, DateField, DateTimeField,
    IntegerField, SetField, TextField
    practice_id = TextField(required=True, length=12)
    sex = SetField(values=('M', 'F', None, 'I'))
    special_2 = SetField(values=(0, 1), field=IntegerField())
 
 

src/a/s/astm-0.5.0/astm/tests/test_mapping.py   astm(Download)
        class Dummy(mapping.Mapping):
            field = mapping.IntegerField()
        self.Dummy = Dummy
 
    def test_get_value(self):
        class Dummy(mapping.Mapping):
            field = mapping.SetField(values=[1, 2, 3],
                                     field=mapping.IntegerField())
        obj = Dummy()
        obj.field = 1
        class Dummy(mapping.Mapping):
            field = mapping.ComponentField(
                mapping = mapping.Component.build(
                    mapping.Field(name='foo'),
                    mapping.IntegerField(name='bar'),
        class Dummy(mapping.Mapping):
            field = mapping.RepeatedComponentField(
                mapping.Component.build(
                    mapping.TextField(name='key'),
                    mapping.IntegerField(name='value'),
        class Thing(mapping.Mapping):
            numbers = mapping.RepeatedComponentField(
                mapping.Component.build(
                    mapping.IntegerField(name='value')
                )