Initial commit

This commit is contained in:
kazbo 2024-05-05 17:24:23 +09:00
commit bb5169bf19
8 changed files with 67 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.venv/*
poetry.lock
__pycache__/

13
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"type" : "debugpy",
"request": "launch",
"name": "Launch project",
"cwd": "${workspaceFolder}",
"module": "python-project-template",
//"args": ["run", "python", "-m", "python-project-template"],
}
]
}

5
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"terminal.integrated.enablePersistentSessions": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
}

19
README.md Normal file
View file

@ -0,0 +1,19 @@
# python-project-template
python project template for me.
## Prerequisites:
- pyenv installed
- poetry 1.8 or newer installed with the specific pyenv environment you want to use
## Usage:
- clone this repository
- `poetry install`
- `poetry run python -m [python-project-template]`
- Also contains vscode configuration
Please refer to the note below for details:
[pythonプロジェクトの実行方法 作り方](https://notes.kinoshita-lab.org/20240311211049-python%E3%81%AE%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E6%A7%8B%E6%88%90)

2
poetry.toml Normal file
View file

@ -0,0 +1,2 @@
[virtualenvs]
in-project = true

16
pyproject.toml Normal file
View file

@ -0,0 +1,16 @@
[tool.poetry]
name = "python-project-template"
version = "0.1.0"
description = "template project for pyenv+poetry"
authors = ["Kaz Saita(raspi4) <saita@kinoshita-lab.org>"]
license = "MIT"
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.11"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

View file

@ -0,0 +1,2 @@
#
# empty file

View file

@ -0,0 +1,7 @@
# !/usr/bin/env python3
def main():
print("Hello World!")
if __name__ == '__main__':
main()