deez-py


Namedeez-py JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/ThePrimeagen/ts-rust-zig-deez
SummaryA Python implementation of a lexical analyzer that provides comprehensive scanning, and lookahead capabilities. It also implements a parser that comes with awesome functionalities.
upload_time2023-06-06 17:42:04
maintainer
docs_urlNone
authorMahmoud Harmouch
requires_python>=3.10,<4.0
licenseGNU General Public License v3.0
keywords python deez_py lexer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =========
deez_py
=========

.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg
   :target: https://github.com/ThePrimeagen/ts-rust-zig-deez_py/tree/master/python/LICENSE
   :alt: License

.. image:: https://img.shields.io/pypi/v/deez_py.svg
   :target: https://pypi.org/project/deez_py/
   :alt: pypi version

**deez_py** is a python implementation of a lexical analyzer that provides comprehensive scanning, and lookahead capabilities. It also implements a parser that comes with awesome functionalities.

๐Ÿ› ๏ธ Requirements
---------------

**deez_py** requires Python 3.10 or above.

To install Python 3.10.1, we recommend using `pyenv`_.

.. code-block:: bash

   # install pyenv
   git clone https://github.com/pyenv/pyenv ~/.pyenv

   # setup pyenv (you should also put these three lines in .bashrc or similar)
   # if you are using zsh
   cat << EOF >> ~/.zshrc
   # pyenv config
   export PATH="${HOME}/.pyenv/bin:${PATH}"
   export PYENV_ROOT="${HOME}/.pyenv"
   eval "$(pyenv init -)"
   EOF

   # or if you using the default bash shell, do this instead:
   cat << EOF >> ~/.bashrc
   # pyenv config
   export PATH="${HOME}/.pyenv/bin:${PATH}"
   export PYENV_ROOT="${HOME}/.pyenv"
   eval "$(pyenv init -)"
   EOF
   # Close and open a new shell session
   # install Python 3.10.1
   pyenv install 3.10.1

   # make it available globally
   pyenv global system 3.10.1


To manage the Python 3.10.1 virtualenv, we recommend using `poetry`_.

.. code-block:: bash

   # install poetry
   curl -sSL https://install.python-poetry.org | python3 -
   poetry --version
   Poetry \(version 1.5.1\)

   # Having the python executable in your PATH, you can use it:
   poetry env use 3.10.1

   # However, you are most likely to get the following issue:
   Creating virtualenv deez_py-dxc671ba-py3.10 in ~/.cache/pypoetry/virtualenvs

   ModuleNotFoundError

   No module named 'virtualenv.seed.via_app_data'

   at <frozen importlib._bootstrap>:973 in _find_and_load_unlocked

   # To resolve it, you need to reinstall virtualenv through pip
   sudo apt remove --purge python3-virtualenv virtualenv
   python3 -m pip install -U virtualenv

   # Now, you can just use the minor Python version in this case:
   poetry env use 3.10.1
   Using virtualenv: ~/.cache/pypoetry/virtualenvs/deez_py-dxc671ba-py3.10


๐Ÿšจ Installation
---------------

With :code:`pip`:

.. code-block:: console

   python3 -m pip install deez-py


๐Ÿšธ Usage
--------

.. code-block:: python3

   >>> from deez_py import Lexer
   >>> lex = Lexer('=+(){},;')
   >>> for _ in range(9):
   >>>     print(lex.get_next_token())
   ...
   Token(type=<TokenType.Equal: '='>, literal='=')
   Token(type=<TokenType.Plus: '+'>, literal='+')
   Token(type=<TokenType.LParen: '('>, literal='(')
   Token(type=<TokenType.RParen: ')'>, literal=')')
   Token(type=<TokenType.LSquirly: '{'>, literal='{')
   Token(type=<TokenType.RSquirly: '}'>, literal='}')
   Token(type=<TokenType.Comma: ','>, literal=',')
   Token(type=<TokenType.Semicolon: ';'>, literal=';')
   Token(type=<TokenType.Eof: 'EOF'>, literal='EOF')


๐Ÿ‘จโ€๐Ÿ’ป Development
------------------

For local development, you can install all dependencies by running:

.. code-block:: bash

   make install


๐Ÿงช Testing
------------------

.. code-block:: bash

   make test
   # or
   pytest -vv tests


๐Ÿ’ก Tips
------------------

To run a subset of tests:

.. code-block:: bash

   make test
   make lint
   make coverage


๐Ÿš€ Deploying
------------------

A reminder for maintainers on how to deploy. Run the following commands in order:

.. code-block:: bash

   bump2version patch # possible: major / minor / patch
   git push
   git push --tags
   make dist
   make release


๐Ÿ“ License
----------

Todo.

.. _pyenv: https://github.com/pyenv/pyenv
.. _poetry: https://github.com/python-poetry/poetry

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ThePrimeagen/ts-rust-zig-deez",
    "name": "deez-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "python,deez_py,lexer",
    "author": "Mahmoud Harmouch",
    "author_email": "business@wiseai.dev",
    "download_url": "https://files.pythonhosted.org/packages/27/55/55c7ca211a88ad6b89dcf345d8bb36ec30255e4cb63cf0aa447b7979d54f/deez_py-0.1.6.tar.gz",
    "platform": null,
    "description": "=========\ndeez_py\n=========\n\n.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg\n   :target: https://github.com/ThePrimeagen/ts-rust-zig-deez_py/tree/master/python/LICENSE\n   :alt: License\n\n.. image:: https://img.shields.io/pypi/v/deez_py.svg\n   :target: https://pypi.org/project/deez_py/\n   :alt: pypi version\n\n**deez_py** is a python implementation of a lexical analyzer that provides comprehensive scanning, and lookahead capabilities. It also implements a parser that comes with awesome functionalities.\n\n\ud83d\udee0\ufe0f Requirements\n---------------\n\n**deez_py** requires Python 3.10 or above.\n\nTo install Python 3.10.1, we 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 << EOF >> ~/.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 << EOF >> ~/.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.10.1\n   pyenv install 3.10.1\n\n   # make it available globally\n   pyenv global system 3.10.1\n\n\nTo manage the Python 3.10.1 virtualenv, we 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.5.1\\)\n\n   # Having the python executable in your PATH, you can use it:\n   poetry env use 3.10.1\n\n   # However, you are most likely to get the following issue:\n   Creating virtualenv deez_py-dxc671ba-py3.10 in ~/.cache/pypoetry/virtualenvs\n\n   ModuleNotFoundError\n\n   No module named 'virtualenv.seed.via_app_data'\n\n   at <frozen importlib._bootstrap>: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.10.1\n   Using virtualenv: ~/.cache/pypoetry/virtualenvs/deez_py-dxc671ba-py3.10\n\n\n\ud83d\udea8 Installation\n---------------\n\nWith :code:`pip`:\n\n.. code-block:: console\n\n   python3 -m pip install deez-py\n\n\n\ud83d\udeb8 Usage\n--------\n\n.. code-block:: python3\n\n   >>> from deez_py import Lexer\n   >>> lex = Lexer('=+(){},;')\n   >>> for _ in range(9):\n   >>>     print(lex.get_next_token())\n   ...\n   Token(type=<TokenType.Equal: '='>, literal='=')\n   Token(type=<TokenType.Plus: '+'>, literal='+')\n   Token(type=<TokenType.LParen: '('>, literal='(')\n   Token(type=<TokenType.RParen: ')'>, literal=')')\n   Token(type=<TokenType.LSquirly: '{'>, literal='{')\n   Token(type=<TokenType.RSquirly: '}'>, literal='}')\n   Token(type=<TokenType.Comma: ','>, literal=',')\n   Token(type=<TokenType.Semicolon: ';'>, literal=';')\n   Token(type=<TokenType.Eof: 'EOF'>, literal='EOF')\n\n\n\ud83d\udc68\u200d\ud83d\udcbb Development\n------------------\n\nFor local development, you can install all dependencies by running:\n\n.. code-block:: bash\n\n   make install\n\n\n\ud83e\uddea Testing\n------------------\n\n.. code-block:: bash\n\n   make test\n   # or\n   pytest -vv tests\n\n\n\ud83d\udca1 Tips\n------------------\n\nTo run a subset of tests:\n\n.. code-block:: bash\n\n   make test\n   make lint\n   make coverage\n\n\n\ud83d\ude80 Deploying\n------------------\n\nA reminder for maintainers on how to deploy. Run the following commands in order:\n\n.. code-block:: bash\n\n   bump2version patch # possible: major / minor / patch\n   git push\n   git push --tags\n   make dist\n   make release\n\n\n\ud83d\udcdd License\n----------\n\nTodo.\n\n.. _pyenv: https://github.com/pyenv/pyenv\n.. _poetry: https://github.com/python-poetry/poetry\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3.0",
    "summary": "A Python implementation of a lexical analyzer that provides comprehensive scanning, and lookahead capabilities. It also implements a parser that comes with awesome functionalities.",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/ThePrimeagen/ts-rust-zig-deez",
        "Repository": "https://github.com/ThePrimeagen/ts-rust-zig-deez"
    },
    "split_keywords": [
        "python",
        "deez_py",
        "lexer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9f135ef32f9cec89085033b76bb4bcb3f005bd487e5bdf4e54af863d37e7c2b",
                "md5": "c0d3f030680d8fbdb00e8c35a369f42a",
                "sha256": "dd1eba8ee5c4c9019fb84a55549ad477bc7a6c130a4e2c347083173a582dd069"
            },
            "downloads": -1,
            "filename": "deez_py-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0d3f030680d8fbdb00e8c35a369f42a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 11197,
            "upload_time": "2023-06-06T17:42:02",
            "upload_time_iso_8601": "2023-06-06T17:42:02.239270Z",
            "url": "https://files.pythonhosted.org/packages/a9/f1/35ef32f9cec89085033b76bb4bcb3f005bd487e5bdf4e54af863d37e7c2b/deez_py-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "275555c7ca211a88ad6b89dcf345d8bb36ec30255e4cb63cf0aa447b7979d54f",
                "md5": "620f7e045752ea2a59f46c07ac8257fe",
                "sha256": "228566f08af4ed1a175107dfbbf8e40ff9c980192802118a6a4b23ef534617f1"
            },
            "downloads": -1,
            "filename": "deez_py-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "620f7e045752ea2a59f46c07ac8257fe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 9595,
            "upload_time": "2023-06-06T17:42:04",
            "upload_time_iso_8601": "2023-06-06T17:42:04.219767Z",
            "url": "https://files.pythonhosted.org/packages/27/55/55c7ca211a88ad6b89dcf345d8bb36ec30255e4cb63cf0aa447b7979d54f/deez_py-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-06 17:42:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ThePrimeagen",
    "github_project": "ts-rust-zig-deez",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "deez-py"
}
        
Elapsed time: 0.13350s