Skip to main content
License 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.

# 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.

# 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 pip:

python3 -m pip install deez-py

🚸 Usage

>>> 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:

make install

🧪 Testing

make test
# or
pytest -vv tests

💡 Tips

To run a subset of tests:

make test
make lint
make coverage

🚀 Deploying

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

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

📝 License

Todo.

Metadata

Release files for deez-py 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deez-py 0.1.6
File Size Uploaded Provenance Actions
deez_py-0.1.6.tar.gz 9.6 kB Without provenance Details for deez_py-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deez-py 0.1.6
File Interpreter ABI Platform Actions
deez_py-0.1.6-py3-none-any.whl Python 3 none any Details for deez_py-0.1.6-py3-none-any.whl

Total release size: 20.8 kB

Release files / deez_py-0.1.6.tar.gz

Download URL deez_py-0.1.6.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
228566f08af4ed1a175107dfbbf8e40ff9c980192802118a6a4b23ef534617f1
BLAKE2b-256 checksum
How to use checksums
275555c7ca211a88ad6b89dcf345d8bb36ec30255e4cb63cf0aa447b7979d54f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-43-generic

Release files / deez_py-0.1.6-py3-none-any.whl

Download URL deez_py-0.1.6-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd1eba8ee5c4c9019fb84a55549ad477bc7a6c130a4e2c347083173a582dd069
BLAKE2b-256 checksum
How to use checksums
a9f135ef32f9cec89085033b76bb4bcb3f005bd487e5bdf4e54af863d37e7c2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.19.0-43-generic

Security for deez-py 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page