Package: jetzt
JetztLight-weight project manager for Python projects.This is a tiny tool built to automate repetitive manual tasks, when creating a new Python development project and managing project dependencies. What you will end up with, when usingjetzt?A newproject directoryunder yourcurrent directory.A newvirtualenvnamedvenvunder the project directory with the System-level installed Python 3.6+ version.The virtualenv will havepipandsetuptoolsinstalled and updated to latest available versions.Additional packages will be installed based on the selected project type.Depending on the project type, other resources may be created to initialize a new project (all from within this repo).PrerequisitesThis has been tested on the following setups:MacOS Sierra 10.12.6 and newerPython 3.6+ (installed viaHomebrew)Zsh shell (with oh-my-zsh)Fedora 29Python 3.6+Bash and Bourne shellsThings should probably work nicely on older releases of macOS / OS X and on various Linux distros too.Python 3.6+ is expected.A changelogis maintained.Create new projectManage Python dependenciesInstall a dependencyList installed dependenciesList outdated dependenciesUpdate outdated dependencyRemove installed dependencyReinstall all dependenciesCreate requirements filesCreate new projectRunjetzt --scaffoldin the directory, where you want to place your project directory, and follow the prompt.Scaffolding optionsYou have couple of options for a new project.Each project will have the following packages installed asdevelopment dependencies:flake8pytestjetztThese will be listed inrequirements-dev.txt.A metadata filejetzt_metadata.jsonis maintained, and this will be used to manage the project metadata, including installed dependencies. This should be committed to git along with the rest of the project files.Python - [Blank]This scaffolding option is meant to be a good starting point for a generic Python project. This option will not install any additional packages.Python - FlaskThis scaffolding option is meant to be a good starting point for a new Flask-based webapp / API project. This option will install the following packages:FlaskThese will be listed inrequirements.txt.Python - JupyterThis scaffolding option is meant to be a good starting point for a new data science / analytics project. This option will install the following packages:jupyter + ipykernelpandasmatplotlibseabornThese will be listed inrequirements.txt.Also adata-directory will be created, andthis notebookwill be copied to the project root (the notebook is included in the installation package).After scaffolding, start a jupyter server by runningjupyter-notebookin the project root directory.Manage Python dependenciesAll dependency management takes place within avirtualenv(created withjetzt --scaffold), somake sure you have activated the project's environment before running these commands withsource venv/bin/activate. There is naturally the standard way of usingpipto install dependencies, and manually add them torequirements.txt, etc.Jetztincludes an option to install and manage the dependencies for you. Please continue reading.Install a dependencyTo install a packagerequests, runjetzt --installand follow the prompt. You have an option to install the package asa production dependencyor asa development dependency. What does all this mean, you might ask? Jetzt will:Install the packagerequests(latest available version).Add the packagerequeststojetzt_metadata.jsonwith a version requirement set to minimum of the currently installed version. The packages, whichrequestsdepends on, arenotadded. You can install a dependency as aDEVdependency too.At the moment, you can only install one package at a time.Example of a defined dependency with a version (as a installation requirement, or as seen injetzt_metadata.json):requests>=2.21.0Version pinning:To install a specific version of a package, add the version, just as you would with pip. For example:requests==2.20.1. This will pin the version like so:requests==2.20.1List installed dependenciesTo list installed dependencies, runjetzt --list.List outdated dependenciesTo list outdated dependencies, runjetzt --outdated.Update outdated dependencyTo update an outdated dependency, runjetzt --update. This will allow you to choose an outdated dependency to update. After the update, the command will update the outdated dependency list automatically.Remove installed dependencyTo remove an installed dependency, runjetzt --remove. This will list all installed dependencies, and let's you choose which one you want to remove. After the update, the command will update the outdated dependency list automatically.Reinstall all dependenciesTo reinstall all dependencies (excluding editable), runjetzt --reinstall. The dependency versions are pinned temporarily for installation, so yo will end up with the same version as before the reinstallation.Make sure, you are in active virtualenv.Create requirements filesRunjetzt --create-requirementsto generate standardrequirements.txtandrequirements-dev.txtbased onjetzt_metadata.json.LicenseMIT.