Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé
Classe « registry »

Constructeur sqlalchemy.orm.registry.__init__

Signature de la constructeur __init__

def __init__(self, *, metadata: 'Optional[MetaData]' = None, class_registry: 'Optional[clsregistry._ClsRegistryType]' = None, type_annotation_map: 'Optional[_TypeAnnotationMapType]' = None, constructor: 'Callable[..., None]' = <function _declarative_constructor at 0x0000020DA13BC2C0>) 

Description

help(registry.__init__)

Construct a new :class:`_orm.registry`

:param metadata:
  An optional :class:`_schema.MetaData` instance.  All
  :class:`_schema.Table` objects generated using declarative
  table mapping will make use of this :class:`_schema.MetaData`
  collection.  If this argument is left at its default of ``None``,
  a blank :class:`_schema.MetaData` collection is created.

:param constructor:
  Specify the implementation for the ``__init__`` function on a mapped
  class that has no ``__init__`` of its own.  Defaults to an
  implementation that assigns \**kwargs for declared
  fields and relationships to an instance.  If ``None`` is supplied,
  no __init__ will be provided and construction will fall back to
  cls.__init__ by way of the normal Python semantics.

:param class_registry: optional dictionary that will serve as the
  registry of class names-> mapped classes when string names
  are used to identify classes inside of :func:`_orm.relationship`
  and others.  Allows two or more declarative base classes
  to share the same registry of class names for simplified
  inter-base relationships.

:param type_annotation_map: optional dictionary of Python types to
  SQLAlchemy :class:`_types.TypeEngine` classes or instances.
  The provided dict will update the default type mapping.  This
  is used exclusively by the :class:`_orm.MappedColumn` construct
  to produce column types based on annotations within the
  :class:`_orm.Mapped` type.

  .. versionadded:: 2.0

  .. seealso::

      :ref:`orm_declarative_mapped_column_type_map`




Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé