ambiente_python_2025
Um esqueleto de um projeto Python com as configurações prontas para o VS Code, Ruff e PyRight.
파일 탐색기
- extensions.json
- settings.json
- __init__.py
- my_module.py
- main.py
- .env-example
- .gitignore
- .python-version
- pyproject.toml
- README.md
- requirements.txt
- uv.lock
# CDN으로 사용하기
jsDelivrjsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.
명령어 용어집
이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.
git add
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
pyenv
여러 버전의 Python 사이를 쉽게 전환.
관련 항목: `asdf`.
더 많은 정보: <https://manned.org/pyenv>.
pyenv commands
사용 가능한 모든 명령 나열:
pyenv versions
`${PYENV_ROOT}/versions` 디렉토리 아래의 모든 Python 버전 나열:
pyenv install --list
업스트림에서 설치할 수 있는 모든 Python 버전 나열:
python
설명 보기 ▼
python
Python 언어 인터프리터.
더 많은 정보: <https://docs.python.org/using/cmdline.html>.
python
REPL(대화형 셸) 시작:
python {{path/to/file.py}}
특정 Python 파일 실행:
python -i {{path/to/file.py}}
특정 Python 파일 실행 후 REPL 시작:
uv add
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
uvx
이 명령은 `uv tool run`의 별칭입니다.
tldr uv tool
자세한 내용은 원본 명령을 참고하세요:
iwr
설명 보기 ▼
iwr
이 명령은 `invoke-webrequest`의 별칭입니다.
tldr invoke-webrequest
자세한 내용은 원본 명령을 참고하세요:
