https://github.com/moebiusmania/learning-python
Just some takes on learning Python, simple stuff, nothing too fancy.
https://github.com/moebiusmania/learning-python
Last synced: 9 months ago
JSON representation
Just some takes on learning Python, simple stuff, nothing too fancy.
- Host: GitHub
- URL: https://github.com/moebiusmania/learning-python
- Owner: moebiusmania
- License: mit
- Created: 2024-02-15T22:42:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T16:51:35.000Z (about 1 year ago)
- Last Synced: 2025-01-31T08:35:33.953Z (11 months ago)
- Language: Python
- Homepage:
- Size: 6.32 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# learning-python 🐍
> Just some takes on learning Python, simple stuff, nothing too fancy.
[Claude 3.5 Sonnet](https://www.anthropic.com/claude) and [Cursor](https://www.cursor.com/) helped me a lot with this.
## Why?
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.
## Setting up the global environment
- install `pyenv` with `brew`
- install latest `python` with `pyenv`
- set latest `python` as global default with `pyenv global `
- in case it doesn't work, adding `eval "$(pyenv init -)"` to `.zshrc` has helped
- checked its working with `$ python --version`
## Setting up the local environment
- set a `python` version as local default with `$ pyenv local `
- `$ python -m venv .venv` create local virtual env
- `$ source .venv/bin/activate` activate the virtual env
- `$ deactivate` to leave the virtual env
- checked its working with `$ python --version`
## Managing dependencies
- install existing dependencies with `$ pip install -r requirements.txt`
- update dependencies with `$ pip freeze > requirements.txt`
## How to run the projects
install dependencies
```bash
$ pip install -r requirements.txt
```
run the script
```bash
$ python .py
```
## Some useful libraries
- pytest - testing
- ruff - format + linter
- ipython - interactive shell
- ipdb - debugger
- litestar - web framework api
## License
Released under the MIT License. See the [LICENSE](LICENSE) file for details.