legislei.models.relatorio module

class legislei.models.relatorio.Evento(*args, **kwargs)[código fonte]

Bases: mongoengine.document.EmbeddedDocument

data_final

Datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: To default the field to the current datetime, use: DateTimeField(default=datetime.utcnow)

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
data_inicial

Datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: To default the field to the current datetime, use: DateTimeField(default=datetime.utcnow)

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
id

A unicode string field.

nome

A unicode string field.

orgaos

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

pautas

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

presenca

32-bit integer field.

set_ausencia_evento_esperado()[código fonte]
set_ausencia_evento_nao_esperado()[código fonte]
set_ausente_evento_previsto()[código fonte]
set_presente()[código fonte]
situacao

A unicode string field.

to_dict()[código fonte]
url

A field that validates input as an URL.

Novo na versão 0.3.

class legislei.models.relatorio.Orgao(*args, **kwargs)[código fonte]

Bases: mongoengine.document.EmbeddedDocument

apelido

A unicode string field.

cargo

A unicode string field.

nome

A unicode string field.

sigla

A unicode string field.

to_dict()[código fonte]
class legislei.models.relatorio.Parlamentar(*args, **kwargs)[código fonte]

Bases: mongoengine.document.EmbeddedDocument

cargo

A unicode string field.

foto

A unicode string field.

id

A unicode string field.

nome

A unicode string field.

partido

A unicode string field.

to_dict()[código fonte]
to_json()[código fonte]

Convert this document to JSON.

Parâmetros:use_db_field – Serialize field names as they appear in MongoDB (as opposed to attribute names on this document). Defaults to True.
uf

A unicode string field.

class legislei.models.relatorio.Proposicao(*args, **kwargs)[código fonte]

Bases: mongoengine.document.EmbeddedDocument

data_apresentacao

Datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: To default the field to the current datetime, use: DateTimeField(default=datetime.utcnow)

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
ementa

A unicode string field.

id

A unicode string field.

numero

A unicode string field.

pauta

A unicode string field.

tipo

A unicode string field.

to_dict()[código fonte]
url_autores

A field that validates input as an URL.

Novo na versão 0.3.

url_documento

A field that validates input as an URL.

Novo na versão 0.3.

voto

A unicode string field.

class legislei.models.relatorio.Relatorio(*args, **values)[código fonte]

Bases: mongoengine.document.Document

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

aviso_dados

A unicode string field.

data_final

Datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: To default the field to the current datetime, use: DateTimeField(default=datetime.utcnow)

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
data_inicial

Datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: To default the field to the current datetime, use: DateTimeField(default=datetime.utcnow)

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
eventos_ausentes

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

eventos_ausentes_esperados_total

32-bit integer field.

eventos_presentes

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

eventos_previstos

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

id

A field wrapper around MongoDB’s ObjectIds.

idTemp

A unicode string field.

objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

orgaos

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

parlamentar

An embedded document field - with a declared document_type. Only valid values are subclasses of EmbeddedDocument.

presenca_absoluta

Floating point number field.

presenca_relativa

Floating point number field.

proposicoes

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

to_dict()[código fonte]
to_json()[código fonte]

Convert this document to JSON.

Parâmetros:use_db_field – Serialize field names as they appear in MongoDB (as opposed to attribute names on this document). Defaults to True.