Git Product home page Git Product logo

the-perfect-python-project's Introduction

The Perfect Python Project

Perfect Python Project

This project is used to demonstrate my idea of a perfect Python project configuration. Nearly everything I've chosen can be bikeshedded for hours or days, but feel free to submit a PR if you can back up your suggestions with evidence. ๐Ÿ˜Š

Get Started Fast - Open in Gitpod

Bikeshedding

Prerequisites

(Last updated September 13, 2020)

  • Latest version of Python (3.8.5)
  • Latest version of Poetry ()

Install PyEnv

For installing Python, you should you PyEnv, regardless of operating system. PyEnv will allow you to easily switch versions of Python. In a perfect world, everyone would be on the latest version, but often we don't have the luxury.

OSX

(You are using Homebrew right?)

brew update
brew install pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc # Add pyenv to Path
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc # Or .bashrc,. .bash_profile, etc. if not using ZSH
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc # Autocompletion, requires shell restart

Windows PowerShell

(You are using Chocolatey right?) **NOTE: ** You should just move to WSL, trust me, the sooner you do it the better everything will be. :)

choco install pyenv-win
# Restart PowerShell
pyenv update # To get the latest versions of Python, otherwise you won't see 3.8.5

Linux, Windows WSL

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc  # Add pyenv to Path
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc # Or .bashrc,. .bash_profile, etc. if not using ZSH
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc # Autocompletion, requires shell restart

Install Python

Time to install the latest version of Python!

pyenv install 3.8.5
pyenv global 3.8.5 # Sets python and python3 globally to point to 3.8.5
# Let's verify 3.8.5 is set globally, close whatever terminal you are using, then run:
python --version # This should say 3.8.5, great job!

Install Poetry

Poetry is a fantastic package manager for Python.

OSX, Linux, Windows WSL

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
echo 'source $HOME/.poetry/env' >> ~/.zshrc

Windows PowerShell

(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python

the-perfect-python-project's People

Contributors

kenerwin88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

the-perfect-python-project's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.