{"id":17623734,"url":"https://github.com/wiseaidev/readonly","last_synced_at":"2025-05-01T09:16:45.256Z","repository":{"id":153385441,"uuid":"629220909","full_name":"wiseaidev/readonly","owner":"wiseaidev","description":"Make any given module attributes read only.","archived":false,"fork":false,"pushed_at":"2024-10-07T23:16:57.000Z","size":277,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T09:16:41.055Z","etag":null,"topics":["python","readonly"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/readonly/","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiseaidev.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-17T21:58:35.000Z","updated_at":"2023-04-17T22:21:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"83016d65-e68e-4915-a9e5-3fe29f536767","html_url":"https://github.com/wiseaidev/readonly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseaidev%2Freadonly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseaidev%2Freadonly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseaidev%2Freadonly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseaidev%2Freadonly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiseaidev","download_url":"https://codeload.github.com/wiseaidev/readonly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251850182,"owners_count":21653978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","readonly"],"created_at":"2024-10-22T21:42:37.955Z","updated_at":"2025-05-01T09:16:45.227Z","avatar_url":"https://github.com/wiseaidev.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"=========\nreadonly\n=========\n\n.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg\n   :target: https://github.com/wiseaidev/readonly/blob/main/LICENSE\n   :alt: License\n\n.. image:: https://img.shields.io/pypi/v/readonly.svg\n   :target: https://pypi.org/project/readonly/\n   :alt: pypi version\n\n.. image:: https://img.shields.io/github/repo-size/wiseaidev/readonly\n   :target: https://github.com/wiseaidev/readonly/\n   :alt: Repo Size\n\n.. image:: https://circleci.com/gh/wiseaidev/readonly/tree/main.svg?style=svg\n   :target: https://circleci.com/gh/wiseaidev/readonly/tree/main\n   :alt: Circle ci Build Status\n\n**readonly** is a simple package to make any given module attributes into read only mode. \n\n🛠️ Requirements\n---------------\n\n**readonly** requires Python 3.9 or above.\n\nTo install Python 3.9, I recommend using `pyenv`_.\n\n.. code-block:: bash\n\n   # install pyenv\n   git clone https://github.com/pyenv/pyenv ~/.pyenv\n\n   # setup pyenv (you should also put these three lines in .bashrc or similar)\n   # if you are using zsh\n   cat \u003c\u003c EOF \u003e\u003e ~/.zshrc\n   # pyenv config\n   export PATH=\"${HOME}/.pyenv/bin:${PATH}\"\n   export PYENV_ROOT=\"${HOME}/.pyenv\"\n   eval \"$(pyenv init -)\"\n   EOF\n\n   # or if you using the default bash shell, do this instead:\n   cat \u003c\u003c EOF \u003e\u003e ~/.bashrc\n   # pyenv config\n   export PATH=\"${HOME}/.pyenv/bin:${PATH}\"\n   export PYENV_ROOT=\"${HOME}/.pyenv\"\n   eval \"$(pyenv init -)\"\n   EOF\n   # Close and open a new shell session\n   # install Python 3.9.10\n   pyenv install 3.9.10\n\n   # make it available globally\n   pyenv global system 3.9.10\n\n\nTo manage the Python 3.9 virtualenv, I recommend using `poetry`_.\n\n.. code-block:: bash\n\n   # install poetry\n   curl -sSL https://install.python-poetry.org | python3 -\n   poetry --version\n   Poetry version 1.1.13\n\n   # Having the python executable in your PATH, you can use it:\n   poetry env use 3.9.10\n\n   # However, you are most likely to get the following issue:\n   Creating virtualenv readonly-dxc671ba-py3.9 in ~/.cache/pypoetry/virtualenvs\n\n   ModuleNotFoundError\n\n   No module named 'virtualenv.seed.via_app_data'\n\n   at \u003cfrozen importlib._bootstrap\u003e:973 in _find_and_load_unlocked\n\n   # To resolve it, you need to reinstall virtualenv through pip\n   sudo apt remove --purge python3-virtualenv virtualenv\n   python3 -m pip install -U virtualenv\n\n   # Now, you can just use the minor Python version in this case:\n   poetry env use 3.9.10\n   Using virtualenv: ~/.cache/pypoetry/virtualenvs/readonly-dxc671ba-py3.9\n\n\n🚨 Installation\n---------------\n\nWith :code:`pip`:\n\n.. code-block:: console\n\n   python3.9 -m pip install readonly\n\n\n🚸 Usage\n--------\n\n.. code-block:: python3\n\n   \u003e\u003e\u003e from readonly import readonly\n   \u003e\u003e\u003e import math\n   \u003e\u003e\u003e math = readonly(math)\n\n   # raises AttributeError\n   \u003e\u003e\u003e math.pi = 3.0\n\n🎉 Credits\n----------\n\nThe following projects were used to build and test :code:`readonly`.\n\n- `python`_\n- `poetry`_\n- `pytest`_\n- `flake8`_\n- `coverage`_\n- `rstcheck`_\n- `mypy`_\n- `pytestcov`_\n- `tox`_\n- `isort`_\n- `black`_\n- `precommit`_\n\n\n👋 Contribute\n-------------\n\nIf you are looking for a way to contribute to the project, please refer to the `Guideline`_.\n\n📝 License\n----------\n\nThis program and the accompanying materials are made available under the terms and conditions of the `GNU GENERAL PUBLIC LICENSE`_.\n\n.. _GNU GENERAL PUBLIC LICENSE: http://www.gnu.org/licenses/\n.. _readonly: https://pypi.org/project/readonly/\n.. _Marco Sulla: https://github.com/Marco-Sulla\n.. _Guideline: https://github.com/wiseaidev/readonly/blob/main/CONTRIBUTING.rst\n.. _pyenv: https://github.com/pyenv/pyenv\n.. _poetry: https://github.com/python-poetry/poetry\n.. _pipx: https://github.com/pypa/pipx\n.. _python: https://www.python.org/\n.. _pytest: https://docs.pytest.org/en/7.1.x/\n.. _flake8: https://flake8.pycqa.org/en/latest/\n.. _coverage: https://coverage.readthedocs.io/en/6.3.2/\n.. _rstcheck: https://pypi.org/project/rstcheck/\n.. _mypy: https://mypy.readthedocs.io/en/stable/\n.. _pytestcov: https://pytest-cov.readthedocs.io/en/latest/\n.. _tox: https://tox.wiki/en/latest/\n.. _isort: https://github.com/PyCQA/isort\n.. _black: https://black.readthedocs.io/en/stable/\n.. _precommit: https://pre-commit.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseaidev%2Freadonly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiseaidev%2Freadonly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseaidev%2Freadonly/lists"}