ambiente_python_2025
Um esqueleto de um projeto Python com as configurações prontas para o VS Code, Ruff e PyRight.
File Explorer
- extensions.json
- settings.json
- __init__.py
- my_module.py
- main.py
- .env-example
- .gitignore
- .python-version
- pyproject.toml
- README.md
- requirements.txt
- uv.lock
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
git add
View Details ▼
git add
Stage changed files for a commit.
git add {{path/to/file}}
Stage a file for a commit:
git add {{[-A|--all]}}
Add all files (tracked and untracked):
git add .
Add all files recursively starting from the current folder:
git branch
View Details ▼
git branch
Main Git command for working with branches.
git branch {{[-a|--all]}}
List all branches (local and remote; the current branch is highlighted by `*`):
git branch {{[-a|--all]}} --contains {{commit_hash}}
List which branches include a specific Git commit in their history:
git branch --show-current
Show the name of the current branch:
git commit
View Details ▼
git commit
Commit files to the repository.
git commit
Open an editor to write a message and commit staged files to the repository:
git commit {{[-m|--message]}} "{{message}}"
Commit staged files to the repository with the specified message:
git commit {{[-F|--file]}} {{path/to/commit_message_file}}
Commit staged files with a message read from a file:
git config
View Details ▼
git config
Manage custom configuration options for Git repositories.
These configurations can be local (for the current repository) or global (for the current user).
git config --global {{user.name|user.email}} "{{Your Name|[email protected]}}"
Globally set your name or email (this information is required to commit to a repository and will be included in all commits):
git config --{{local|global|system}} {{[-l|--list]}} --show-origin
List local, global, or system configuration entries and show their file location:
git config --global {{alias.unstage}} "reset HEAD --"
Set the global value of a given configuration entry (in this case an alias):
git init
View Details ▼
git init
Initialize a new local Git repository.
git init
Initialize a new local repository:
git init {{[-b|--initial-branch]}} {{branch_name}}
Initialize a repository with the specified name for the initial branch:
git init --object-format sha256
Initialize a repository using SHA256 for object hashes (requires Git version 2.29+):
git push
View Details ▼
git push
Push commits to a remote repository.
git push
Send local changes in the current branch to its default remote counterpart:
git push {{remote_name}} {{local_branch}}
Send changes from a specific local branch to its remote counterpart:
git push {{[-u|--set-upstream]}} {{remote_name}} {{local_branch}}
Send changes from a specific local branch to its remote counterpart, and set the remote one as the default push/pull target of the local one:
git remote
View Details ▼
git remote
Manage set of tracked repositories ("remotes").
git remote {{[-v|--verbose]}}
List existing remotes with their names and URLs:
git remote show {{remote_name}}
Show information about a remote:
git remote add {{remote_name}} {{remote_url}}
Add a remote:
pip install
View Details ▼
pip install
Install Python packages.
pip install {{package1 package2 ...}}
Install one or more packages:
pip install {{package1 package2 ...}} {{[-U|--upgrade]}}
Upgrade all specified packages to the latest version, installing any that are not already present:
pip install {{package}}=={{version}}
Install a specific version of a package:
pyenv
View Details ▼
pyenv
Switch between multiple versions of Python easily.
See also: `asdf`.
pyenv commands
List all available commands:
pyenv versions
List all Python versions under the `${PYENV_ROOT}/versions` directory:
pyenv install --list
List all Python versions that can be installed from upstream:
python
View Details ▼
python
Python language interpreter.
python
Start a REPL (interactive shell):
python {{path/to/file.py}}
Execute a specific Python file:
python -i {{path/to/file.py}}
Execute a specific Python file and start a REPL:
uv add
View Details ▼
uv add
Add package dependencies to the `pyproject.toml` file.
Packages are specified according to <https://peps.python.org/pep-0508/>.
uv add {{package}}
Add the latest version of a package:
uv add {{package1 package2 ...}}
Add multiple packages:
uv add {{package>=1.2.3}}
Add a package with a version requirement:
uv init
View Details ▼
uv init
Create a new Python project.
uv init
Initialize a project in the current directory:
uv init {{project_name}}
Initialize a project with a certain name:
uv init --directory {{path/to/directory}} {{project_name}}
Create a project in a given directory:
uv pip
View Details ▼
uv pip
Provides pip-like commands for installing, uninstalling, and managing packages.
uv pip install {{package}}
Install a package:
uv pip install {{[-r|--requirements]}} {{requirements.txt}}
Install packages from a requirements file:
uv pip install {{package==1.2.3}}
Install a package with a specific version:
uv remove
View Details ▼
uv remove
Remove dependencies from the project's `pyproject.toml` file.
uv remove {{package}}
Remove a dependency from the project:
uv remove {{package1 package2 ...}}
Remove multiple dependencies:
uv remove --dev {{package}}
Remove a development dependency:
uv run
View Details ▼
uv run
Run a command or script in the project environment.
uv run {{path/to/script.py}}
Run a Python script:
uv run {{[-m|--module]}} {{module_name}}
Run a Python module:
uv run {{[-w|--with]}} {{package}} {{command}}
Run a command with additional packages installed temporarily:
uv sync
View Details ▼
uv sync
Update the project's environment to match the lockfile.
uv sync
Sync the project environment with the lockfile:
uv sync --all-extras
Sync and include all optional dependencies:
uv sync --extra {{extra_name}}
Sync with specific optional dependencies:
uv tool
View Details ▼
uv tool
Install and run commands provided by Python packages.
uv tool run {{command}}
Run a command from a package, without installing it:
uv tool install {{package}}
Install a Python package system-wide:
uv tool upgrade {{package}}
Upgrade an installed Python package:
uvx
View Details ▼
uvx
This command is an alias of `uv tool run`.
tldr uv tool
View documentation for the original command:
iwr
View Details ▼
iwr
In PowerShell, this command is an alias of `Invoke-WebRequest`.
tldr invoke-webrequest
View documentation for the original command:
