============
Introduction
============

This tutorial is intended to introduce you to the basics of Traits
and to give you an idea of what capabilities the Traits library provides.
This tutorial assumes that you are comfortable with the Python
programming language, object-oriented programming, and the core tools of
the Python scientific ecosystem, such as NumPy.

This tutorial is designed to introduce the basics of Traits, but also to
explain *why* you might want to use Traits in your own code.

An interactive version of this tutorial can be accessed using the
`ETS Demo application <https://pypi.org/project/etsdemo/>`_.

.. include:: ../../../traits/examples/introduction/0_introduction.py
   :start-after: """
   :end-before: """

.. literalinclude:: ../../../traits/examples/introduction/0_introduction.py
   :start-at: import datetime

Links
-----

- :download:`Source code <../../../traits/examples/introduction/0_introduction.py>`

.. include:: ../../../traits/examples/introduction/1_validation.py
   :start-after: """
   :end-before: """

Links
-----

- :ref:`defining-traits-initialization-and-validation`
- :download:`Source code <../../../traits/examples/introduction/1_validation.py>`

.. include:: ../../../traits/examples/introduction/2_initialization.py
   :start-after: """
   :end-before: """

Links
-----

- :ref:`defining-traits-initialization-and-validation`
- :download:`Source code <../../../traits/examples/introduction/2_initialization.py>`

.. include:: ../../../traits/examples/introduction/3_observation.py
   :start-after: """
   :end-before: """

Links
-----

- :ref:`observe-notification`
- :download:`Source code <../../../traits/examples/introduction/3_observation.py>`

.. include:: ../../../traits/examples/introduction/4_properties.py
   :start-after: """
   :end-before: """

Links
-----

- :ref:`property-traits`
- :download:`Source code <../../../traits/examples/introduction/4_properties.py>`

.. include:: ../../../traits/examples/introduction/5_documentation.py
   :start-after: """
   :end-before: """

Links
-----

- :ref:`hasstricttraits`
- :download:`Source code <../../../traits/examples/introduction/5_documentation.py>`

.. include:: ../../../traits/examples/introduction/6_visualization.py
   :start-after: """
   :end-before: """

Links
-----

- `TraitsUI Documentation <https://docs.enthought.com/traitsui/>`_
- :download:`Source code <../../../traits/examples/introduction/6_visualization.py>`
