Just some takes on learning Python, simple stuff, nothing too fancy.
Claude 3.5 Sonnet and Cursor helped me a lot with this.
I already had to get my hands dirty with Python in the last months, so I think it's time to start learning it properly. At least the basics.
Also I would like to start playing a bit with LLMs and related stuff on my local machine, and that's mostly Python ground.
- install
pyenvwithbrew - install latest
pythonwithpyenv - set latest
pythonas global default withpyenv global <version>- in case it doesn't work, adding
eval "$(pyenv init -)"to.zshrchas helped
- in case it doesn't work, adding
- checked its working with
$ python --version
- set a
pythonversion as local default with$ pyenv local <version> $ python -m venv .venvcreate local virtual env$ source .venv/bin/activateactivate the virtual env$ deactivateto leave the virtual env
- checked its working with
$ python --version
- install existing dependencies with
$ pip install -r requirements.txt - update dependencies with
$ pip freeze > requirements.txt
install dependencies
$ pip install -r requirements.txtrun the script
$ python <script>.py- pytest - testing
- ruff - format + linter
- ipython - interactive shell
- ipdb - debugger
- litestar - web framework api
Released under the MIT License. See the LICENSE file for details.