semvec/pypi-packages huggingface dataset:
python-readonly 0.1.0
Python readonly metaclass and decorator
License: MIT
Requires Python: >=3.6,<4.0

python-readonly
===============

|Python| |Tests| |GitHub license|

Python readonly metaclass and decorator

.. _️-attention:

⚠️ Attention
===============

This module is **experimental.** It may not work as expected.

.. _-requirements:

🕶 Requirements
===============

-  Python 3.6+

.. _-usage:

💎 Usage
==========

metaclass **(Recommend)**

.. code:: py

   from python_readonly import MetaReadonly

   class Store(metaclass=MetaReadonly):
       NAME = "Amazon"

   print(Store.NAME) # Amazon
   Store.NAME = "Rakuten" # TypeError

decorator

.. code:: py

   from python_readonly import readonly

   @readonly
   class Store:
       NAME = "Amazon"

   print(Store.NAME) # Amazon
   Store.NAME = "Rakuten" # TypeError

.. _-license:

📝 License
===========

See also
`LICENSE <https://github.com/err931/python-readonly/blob/master/LICENSE>`__

.. _-author:

👤 Author
===========

Copyright © 2020 Kamino

.. |Python| image:: https://img.shields.io/badge/Python-3.6%2B-blue
   :target: https://www.python.org/downloads/
.. |Tests| image:: https://github.com/err931/python-readonly/workflows/Tests/badge.svg
.. |GitHub license| image:: https://img.shields.io/github/license/err931/python-readonly
   :target: https://github.com/err931/python-readonly/blob/master/LICENSE