https://github.com/joeyguerra/python-starter
Python starter app
https://github.com/joeyguerra/python-starter
Last synced: 3 months ago
JSON representation
Python starter app
- Host: GitHub
- URL: https://github.com/joeyguerra/python-starter
- Owner: joeyguerra
- License: mit
- Created: 2021-07-27T00:52:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-27T03:48:08.000Z (almost 4 years ago)
- Last Synced: 2025-01-26T06:23:21.715Z (4 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Starter App
## First time setup
### Install Python with pyenv
Install `pyenv` to manage Python versions, install Python and set the global version to use.
```sh
brew install pyenv# install python 3.9.4
pyenv install 3.9.4# set global version of python
pyenv global 3.9.4
```If you're using MacOS and `zsh`, then run this too:
```sh
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.zshrc
```For Bash:
```sh
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.bash_profile
echo 'PATH=$(python -m site --user-base)/bin:$PATH' >> ~/.bash_profile
```You might need to also alias `pip` to `pip3`:
```sh
echo 'alias pip=/opt/homebrew/bin/pip3' >> ~/.zshrc
```For Bash:
```sh
echo 'alias pip=/opt/homebrew/bin/pip3' >> ~/.bashrc
```### Manage dependencies with pipenv
```sh
pip install pipenv
```## Day to day development
Set `PIPENV_VENV_IN_PROJECT='enabled'` to create `.ven` at the root level instead of at the user level.
```sh
export PIPENV_VENV_IN_PROJECT='enabled'
```### Run tests
```sh
pipenv runt test
```### Installing Dependencies
Install packages via `pipenv`. The `PIPENV_VENV_IN_PROJECT` set above will tell `pipenv` to install packages in the `.venv` folder at the root level of this codebase. This encourages reproducible builds.
```sh
pipenv install
```