Starts a new project in a directory, with a venv, a .gitignore, and installs some packages to get started.
The idea of this is that it gets projects off the ground in a consistent and useful way, with all the things you'll need to succeed.
Clone this repo into the same folder that you want the new repo to be in. It'll make a repo next to this one.
parent
║
╠═ py_start ⟸ This repo
║
╚═ new_repo ⟸ your new repo. You can call it whatever you like
Then run the start.py file. This is how I run it on my computer:
C:\Users\bd\repos\py_start>python start.py
And then it'll ask you a bunch of questions about what you want to do.
It'll:
- Make a folder for your project
- Download a
.gitignore
with everything you need for a good python project - Sets up a virtual environment using
venv
- Make a
requirements.in
file, which then compiles to arequirements.txt
- Gives you all the instructions on what to do next
Give it a go!
For using your new venv:
- It's a virtual environment, so you can run specific versions of libraries in isolation of other libraries you may have
- This is an ideal workaround for if you're having difficulties with your virtual machine environment where you are unable to use pip when Using Path Variable(s)
- A few ways you can activate a venv:
venv\Scripts\Activate.ps1
, or,Ctrl+Shift+P
SelectingPython Select Interpreter
then opening a new terminal. - If using VS code, you can quickly check that the venv is active by the green text with the active venv name in the terminal.
- Check that it's not defaulting to another venv by accident if you have multiple venv
- Make sure you install the library you need into the venv, else it won't work!
This project is super young, so there's nothing formal to do. Just hack away and submit a PR, or open an issue and I'll see what I can do.