MCPcopy Create free account

hub / github.com/schematics/schematics / functions

Functions853 in github.com/schematics/schematics

↓ 159 callersMethodvalidate
Validates the state of the model. If the data is invalid, raises a ``DataError`` with error messages. :param bool partial:
schematics/models.py:240
↓ 65 callersMethodserialize
(self, *args, **kwargs)
schematics/models.py:311
↓ 61 callersMethodformat
(self, *args, **kwargs)
schematics/translator.py:18
↓ 41 callersMethodto_native
(self, value, context=None)
schematics/types/base.py:826
↓ 39 callersMethodget
(self, key, default=None)
schematics/models.py:342
↓ 25 callersMethoditems
(self)
schematics/models.py:336
↓ 22 callersMethodto_primitive
(self, value, context)
tests/test_export.py:87
↓ 22 callersMethodupdate
Update the particular fields rather than all fields. This works from Django 1.7+.
examples/django/linkify/links/models.py:27
↓ 20 callersFunctionblacklist
Returns a function that operates as a blacklist for the provided list of fields. A blacklist is a list of fields explicitly named that a
schematics/transforms.py:322
↓ 18 callersMethodto_native
(self, value, context)
tests/test_export.py:83
↓ 14 callersMethodmock
(self, context=None)
schematics/types/base.py:345
↓ 13 callersMethodpop
Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].
schematics/datastructures.py:252
↓ 12 callersMethod__init__
(self, **kwargs)
schematics/types/base.py:511
↓ 12 callersFunctionwhitelist
Returns a function that operates as a whitelist for the provided list of fields. A whitelist is a list of fields explicitly named that a
schematics/transforms.py:312
↓ 11 callersMethodto_primitive
Use a combination of ``default_locale`` and ``context.app_data['locale']`` to return the best localized string.
schematics/types/base.py:1132
↓ 11 callersFunctionvalidate
Validate some untrusted data using a model. Trusted data can be passed in the `trusted_data` parameter. :param schema: The Schem
schematics/validate.py:18
↓ 10 callersMethodto_native
(self, value, context=None)
schematics/contrib/enum_type.py:46
↓ 9 callersFunctionatoms
Iterator for the atomic components of a model definition and relevant data that creates a 3-tuple of the field's name, its type instance and
schematics/iteration.py:24
↓ 9 callersMethodconvert
(self, value, context=None)
schematics/types/base.py:290
↓ 9 callersMethodexport
(self, field_converter=None, role=None, app_data=None, **kwargs)
schematics/models.py:301
↓ 9 callersFunctionsetdefault
(obj, attr, value, search_mro=False, overwrite_none=False)
schematics/util.py:29
↓ 9 callersMethodto_primitive
(self, value, context=None)
schematics/types/base.py:971
↓ 8 callersMethodvalues
(self)
schematics/models.py:339
↓ 7 callersMethodcopy
New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]
schematics/datastructures.py:217
↓ 7 callersFunctionexport_loop
The export_loop function is intended to be a general loop definition that can be used for any form of data shaping, such as application of ro
schematics/transforms.py:203
↓ 7 callersFunctiontest_field
(field, valid)
tests/test_datetime.py:262
↓ 7 callersMethodto_native
Make sure that a geo-value is of type (x, y)
schematics/types/base.py:1050
↓ 6 callersMethodconvert
(self, value, context=None)
schematics/types/union.py:82
↓ 6 callersMethodimport_data
Converts and imports the raw data into an existing model instance. :param raw_data: The data to be imported.
schematics/models.py:268
↓ 6 callersMethodkeys
(self)
schematics/models.py:333
↓ 6 callersMethodpost
(self, request)
examples/django/linkify/links/views.py:26
↓ 6 callersMethodto_native
(self, role=None, app_data=None, **kwargs)
schematics/models.py:305
↓ 5 callersMethod__init__
The base class for all Schematics errors. message should be a human-readable message, while errors is a machine-readable lis
schematics/exceptions.py:27
↓ 5 callersMethod_branch
(self, **kwargs)
schematics/datastructures.py:132
↓ 5 callersFunction_chrcls
Given a subset of the URL-compatible special characters ``!#$%&'()*+,-./:;=?@[]_~``, returns a regex character class matching any URL-compati
schematics/types/net.py:132
↓ 5 callersMethod_resolve
(self, value, context)
schematics/types/union.py:70
↓ 5 callersMethod_setdefault
(self, *args)
schematics/datastructures.py:97
↓ 5 callersMethodget
(self, request)
examples/django/linkify/links/views.py:47
↓ 5 callersMethodis_allowed_model
(self, model_instance)
schematics/types/compound.py:373
↓ 5 callersFunctionlistify
(value)
schematics/util.py:59
↓ 5 callersFunctionprepare_validator
(func, argcount)
schematics/validate.py:120
↓ 5 callersMethodto_dict
(self)
examples/django/linkify/links/models.py:9
↓ 5 callersMethodto_native
(self, value, context=None)
schematics/types/base.py:672
↓ 5 callersFunctionto_primitive
(cls, instance_or_dict, **kwargs)
schematics/transforms.py:435
↓ 5 callersMethodto_primitive
(self, value, context=None)
tests/test_model_type.py:221
↓ 5 callersMethodutcoffset
(self, dt)
schematics/types/base.py:766
↓ 4 callersMethod__init__
(self, field, # type: T min_size=None, max_size=None, **kwargs)
schematics/types/compound.py:185
↓ 4 callersFunction_assert
(e)
tests/test_exceptions.py:19
↓ 4 callersMethod_cmp_err
(self, other, op)
schematics/undefined.py:42
↓ 4 callersMethod_setdefaults
(self, source)
schematics/datastructures.py:141
↓ 4 callersMethod_update
(self, source=None, **kwargs)
schematics/datastructures.py:67
↓ 4 callersFunctionconvert
(cls, mutable, raw_data=None, **kwargs)
schematics/transforms.py:427
↓ 4 callersFunctionget_helptest_model
()
tests/test_model_help_text_mixin.py:9
↓ 4 callersFunctionget_value_in
(min_length, max_length, padding=0, required_length=0)
schematics/types/base.py:73
↓ 4 callersFunctionmissing
(d, fieldname, init_to_none)
tests/test_conversion.py:14
↓ 4 callersFunctionrandom_string
(length, chars=_alphanumeric)
schematics/types/base.py:81
↓ 4 callersMethodsetUp
(self)
examples/django/linkify/links/tests/integration_tests/test_links.py:73
↓ 4 callersMethodto_native
(self, value, context=None)
schematics/types/base.py:412
↓ 4 callersMethodto_primitive
(self, value, context=None)
schematics/types/union.py:99
↓ 4 callersMethodto_primitive
(self, value, context)
tests/test_union_type.py:56
↓ 3 callersMethod_all_metadata
Collate all metadata from fields defined on this Model for simpler usage elsewhere in this class.
schematics/extensions/model_help_text_mixin.py:50
↓ 3 callersMethod_convert
Converts the instance raw data into richer Python constructs according to the fields on the model, validating data if requested.
schematics/models.py:281
↓ 3 callersMethod_make
(cls, obj)
schematics/datastructures.py:119
↓ 3 callersMethod_setup
(self, field_name, owner_model)
schematics/types/compound.py:133
↓ 3 callersMethod_transition
(self, trigger=None, src_state=None, dst_state=None)
schematics/contrib/machine.py:36
↓ 3 callersMethodexport
(self, value, format, context=None)
schematics/types/compound.py:56
↓ 3 callersFunctionget_export_context
(field_converter=to_native_converter, **options)
schematics/transforms.py:413
↓ 3 callersMethodget_export_level
(self, context)
schematics/types/base.py:253
↓ 3 callersMethodget_or_404
(self, pk)
examples/django/linkify/links/views.py:60
↓ 3 callersFunctionpy_native_string
Converts Unicode strings to bytestrings on Python 2. The intended usage is to wrap a function or a string in cases where Python 2 expects a n
schematics/compat.py:52
↓ 3 callersMethodto_native
(self, value, context=None)
schematics/contrib/mongo.py:34
↓ 3 callersMethodto_native
(self, value, context=None)
schematics/types/base.py:621
↓ 3 callersMethodto_primitive
converts the errors dict to a primitive representation of dicts, list and strings.
schematics/exceptions.py:48
↓ 3 callersMethodto_primitive
(self, value, context=None)
schematics/types/base.py:686
↓ 3 callersMethodto_primitive
(self, value, context=None)
schematics/types/base.py:919
↓ 2 callersFunction_dict
(mapping)
schematics/compat.py:90
↓ 2 callersFunction_filter_kwargs
(valid_args, kwargs)
schematics/types/union.py:29
↓ 2 callersMethod_from_iterable
(self, iterable)
schematics/role.py:30
↓ 2 callersMethod_get
(self, *args)
schematics/datastructures.py:93
↓ 2 callersMethod_get_input_keys
(self, mapping=None)
schematics/types/base.py:270
↓ 2 callersMethod_init_field
Instantiate the inner field that represents each element within this compound type. In case the inner field is itself a compound type
schematics/types/compound.py:71
↓ 2 callersMethod_keys
(self)
schematics/datastructures.py:95
↓ 2 callersMethod_new
(cls, *args, **kwargs)
schematics/datastructures.py:113
↓ 2 callersMethod_normalize
(cls, value)
schematics/types/base.py:1043
↓ 2 callersMethod_set_export_level
(self, export_level, serialize_when_none)
schematics/types/base.py:243
↓ 2 callersMethod_to_primitive
recursive to_primitive for basic data types.
schematics/exceptions.py:68
↓ 2 callersFunction_valid_init_args
(type_)
schematics/types/union.py:17
↓ 2 callersMethodappend_field
(self, field)
schematics/schema.py:28
↓ 2 callersFunctioncalculated
(type, fget, fset=None)
schematics/types/serializable.py:66
↓ 2 callersMethodcheck_required
(self, value, context)
schematics/types/base.py:335
↓ 2 callersFunctionfill_template
(template, min_length, max_length)
schematics/types/base.py:43
↓ 2 callersFunctionget_all_subclasses
(cls)
schematics/util.py:72
↓ 2 callersMethodget_example_usage
Generate example python code to use this Model.
schematics/extensions/model_help_text_mixin.py:95
↓ 2 callersFunctionget_import_context
(field_converter=import_converter, **options)
schematics/transforms.py:399
↓ 2 callersMethodget_input_keys
(self, mapping=None)
schematics/types/base.py:264
↓ 2 callersMethodget_mock_object
Get a mock object. :param dict context: :param dict overrides: overrides for the model
schematics/models.py:361
↓ 2 callersMethodget_parameter_descriptions
(cls)
schematics/extensions/model_help_text_mixin.py:107
↓ 2 callersFunctionget_range_endpoints
(min_length, max_length, padding=0, required_length=0)
schematics/types/base.py:52
↓ 2 callersFunctionget_validation_context
(**options)
schematics/validate.py:107
↓ 2 callersFunctionhelp_text_metadata
Standard interface to help specify the required metadata fields for helptext to work correctly for a model. :param str label: Alternativ
schematics/extensions/model_help_text_mixin.py:8
next →1–100 of 853, ranked by callers