U
    õÕ/e,  ã                   @  sZ  d Z ddlmZ ddlZe e¡ZdZddlm	Z	 e	 ddl
mZ e ddl
mZ e dd	lmZ e dd
lmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlmZ e ddlm Z  e  ddlm!Z! e! ddlm"Z" e" ddlm#Z# e# ddlm$Z$ e$ ddlm%Z% e% ddlm&Z& e& ddlm'Z' e' dd lm(Z( e( dd!lm)Z) e) dd"lm*Z* e* dd#lm+Z+ e+ dd$lm,Z, e, dd%lm-Z- e- dd&lm.Z. e. dd'lm/Z/ e/ dd(lm0Z0 e0 dd)lm1Z1 e1 dd*lm2Z2 e2 dd+lm3Z3 e3 dd,lm4Z4 e4 dd-lm5Z5 e5 dd.l6m7Z7 e7 dd/l6m8Z8 e8 dd0l6m9Z9 e9 dd1l:m;Z; e; dd2l<m=Z= e= dd3l>m?Z? e? dd4l@mAZA eA dd5l@mBZB eB dd6lCmDZD eD dd7lEmFZF eF dd8lGmHZH eH dd9lImJZJ eJ dd:lImKZK eK dd;lLmMZM eM dd<lLmNZN eN dd=lLmOZO eO dd>lLmPZP eP dd?lLmQZQ eQ dd@lLmRZR eR ddAlLmSZS eS ddBlTmUZU eU ddClVmWZW eW ddDlVmXZX eX ddElYmZZZ eZ ddFlYm[Z[ e[ ddGlYm\Z\ e\ ddHlYm]Z] e] ddIlYm^Z^ e^ ddJlYm_Z_ e_ ddKl`maZa ea ddLlbmcZc ec ddMlbmdZd ed ddNlbmeZe ee ddOlfmgZg eg ddPlhmiZi ei ddQljmkZk ek ddRljmlZl el ddSljmmZm em ddTljmnZn en ddUljmoZo eo ddVljmpZp ep ddWlqmrZr er ddXlqmsZs es dS )Yah   Provide property types for Bokeh models

Properties are objects that can be assigned as class attributes on Bokeh
models, to provide automatic serialization, validation, and documentation.

This documentation is broken down into the following sections:

.. contents::
    :local:

Overview
--------

There are many property types defined in the module, for example ``Int`` to
represent integral values, ``Seq`` to represent sequences (e.g. lists or
tuples, etc.). Properties can also be combined: ``Seq(Float)`` represents
a sequence of floating point values.

For example, the following defines a model that has integer, string, and
list[float] properties:

.. code-block:: python

    class SomeModel(Model):
        foo = Int
        bar = String(default="something")
        baz = List(Float, help="docs for baz prop")

As seen, properties can be declared as just the property type, e.g.
``foo = Int``, in which case the properties are automatically instantiated
on new Model objects. Or the property can be instantiated on the class,
and configured with default values and help strings.

The properties of this class can be initialized by specifying keyword
arguments to the initializer:

.. code-block:: python

    m = SomeModel(foo=10, bar="a str", baz=[1,2,3,4])

But also by setting the attributes on an instance:

.. code-block:: python

    m.foo = 20

Attempts to set a property to a value of the wrong type will
result in a ``ValueError`` exception:

.. code-block:: python

    >>> m.foo = 2.3
    Traceback (most recent call last):

      << traceback omitted >>

    ValueError: expected a value of type Integral, got 2.3 of type float

Models with properties know how to serialize themselves, to be understood
by BokehJS. Additionally, any help strings provided on properties can be
easily and automatically extracted with the Sphinx extensions in the
:ref:`bokeh.sphinxext` module.


Basic Properties
----------------

.. autoclass:: Alpha
.. autoclass:: Angle
.. autoclass:: Any
.. autoclass:: AnyRef
.. autoclass:: Auto
.. autoclass:: Bool
.. autoclass:: Byte
.. autoclass:: Color
.. autoclass:: Complex
.. autoclass:: DashPattern
.. autoclass:: Date
.. autoclass:: Datetime
.. autoclass:: Either
.. autoclass:: Enum
.. autoclass:: Float
.. autoclass:: FontSize
.. autoclass:: Image
.. autoclass:: Instance
.. autoclass:: Int
.. autoclass:: Interval
.. autoclass:: JSON
.. autoclass:: MarkerType
.. autoclass:: MinMaxBounds
.. autoclass:: NonNegativeInt
.. autoclass:: Null
.. autoclass:: Percent
.. autoclass:: PositiveInt
.. autoclass:: RGB
.. autoclass:: Regex
.. autoclass:: Size
.. autoclass:: String
.. autoclass:: Struct
.. autoclass:: TimeDelta

Container Properties
--------------------

.. autoclass:: Array
.. autoclass:: ColumnData
.. autoclass:: Dict
.. autoclass:: List
.. autoclass:: RelativeDelta
.. autoclass:: Seq
.. autoclass:: Tuple
.. autoclass:: RestrictedDict

DataSpec Properties
-------------------

.. autoclass:: AlphaSpec
.. autoclass:: AngleSpec
.. autoclass:: ColorSpec
.. autoclass:: DataSpec
.. autoclass:: DistanceSpec
.. autoclass:: FontSizeSpec
.. autoclass:: MarkerSpec
.. autoclass:: NumberSpec
.. autoclass:: PropertyUnitsSpec
.. autoclass:: SizeSpec
.. autoclass:: StringSpec

Helpers
~~~~~~~

.. autofunction:: expr
.. autofunction:: field
.. autofunction:: value

Special Properties
------------------

.. autoclass:: Include
.. autoclass:: Nullable
.. autoclass:: NonNullable
.. autoclass:: Override

Validation-only Properties
--------------------------

.. autoclass:: PandasDataFrame
.. autoclass:: PandasGroupBy

Validation Control
------------------

By default, Bokeh properties perform type validation on values. This helps to
ensure the consistency of any data exchanged between Python and JavaScript, as
well as provide detailed and immediate feedback to users if they attempt to
set values of the wrong type. However, these type checks incur some overhead.
In some cases it may be desirable to turn off validation in specific places,
or even entirely, in order to boost performance. The following API is available
to control when type validation occurs.

.. autoclass:: validate
.. autofunction:: without_property_validation

é    )ÚannotationsN)JÚAliasÚAlphaÚ	AlphaSpecÚAngleÚ	AngleSpecÚAnyÚAnyRefÚArrayÚAutoÚBase64StringÚBoolÚByteÚColorÚColorHexÚ	ColorSpecÚ
ColumnDataÚComplexÚDashPatternÚDataSpecÚDateÚDatetimeÚDictÚDistanceSpecÚEitherÚEnumÚFactorÚ	FactorSeqÚFloatÚFontSizeÚFontSizeSpecÚHatchPatternSpecÚHatchPatternTypeÚImageÚIncludeÚInstanceÚIntÚIntervalÚJSONÚListÚ
MarkerSpecÚ
MarkerTypeÚ
MathStringÚMinMaxBoundsÚNonNegativeIntÚNonNullableÚNullÚNullStringSpecÚNullableÚ
NumberSpecÚOverrideÚPandasDataFrameÚPandasGroupByÚPercentÚPositiveIntÚPropertyUnitsSpecÚRGBÚReadonlyÚRegexÚRelativeDeltaÚRestrictedDictÚSeqÚSizeÚSizeSpecÚStringÚ
StringSpecÚStructÚ	TimeDeltaÚTextLikeÚTupleÚexprÚfieldÚvalidateÚvalueÚwithout_property_validationé   )r   )r   )r	   )r   )r   )r   )r:   )r   )r
   )r   )r   )r)   )r?   )rG   )r=   )r>   )r   )r   )r   )ÚDashPatternSpec)r   )r   )rH   )rI   )r    )ÚFontStyleSpec)r!   )ÚIntSpec)ÚLineCapSpec)ÚLineJoinSpec)r*   )ÚNullDistanceSpec)r1   )r3   )r9   )rA   )rC   )ÚTextAlignSpec)ÚTextBaselineSpec)rK   )r   )r   )rE   )ÚUnsetValueError)r   )r   )r   )r   )r$   )r%   )r(   )r/   )r2   )r   )r   )r'   )r.   )r7   )r8   )r@   )r4   )r5   )r6   )r   )r   )r&   )r   )r0   )rB   )r;   )r   )r,   )r<   )rD   )rF   )r   )r   )r"   )r#   )r-   )r+   )rJ   )rL   )tÚ__doc__Ú
__future__r   ÚloggingÚ	getLoggerÚ__name__ÚlogÚ__all__Zproperty.aliasr   Zproperty.anyr   r	   Zproperty.autor   Zproperty.colorr   r   r:   r   Zproperty.containerr
   r   r   r)   r?   rG   r=   r>   Zproperty.dataspecr   r   r   rN   r   r   rH   rI   r    rO   r!   rP   rQ   rR   r*   rS   r1   r3   r9   rA   rC   rT   rU   rK   Zproperty.datetimer   r   rE   Zproperty.descriptorsrV   Zproperty.eitherr   Zproperty.enumr   Zproperty.factorsr   r   Zproperty.includer$   Zproperty.instancer%   Zproperty.jsonr(   Zproperty.nullabler/   r2   Zproperty.numericr   r   r'   r.   r7   r8   r@   Zproperty.overrider4   Zproperty.pandasr5   r6   Zproperty.primitiver   r   r&   r   r0   rB   Zproperty.readonlyr;   Zproperty.stringr   r,   r<   Zproperty.structrD   Zproperty.text_likerF   Zproperty.visualr   r   r"   r#   r-   r+   Zproperty.validationrJ   rL   © r^   r^   ú9/tmp/pip-unpacked-wheel-f5fndrjf/bokeh/core/properties.pyÚ<module>   sV   (

Q                                                                                   