§2023-10-31

Basic usage

For the basic usage introduction we will be installing pendulum, a datetime library.

  1. Project setup
alexlai@orgpi516G /opt/xfs/build $ poetry new poetry-demo
Created package poetry_demo in poetry-demo
$ tree poetry-demo/
poetry-demo/
├── poetry_demo
│   └── __init__.py
├── pyproject.toml
├── README.md
└── tests
    └── __init__.py

3 directories, 4 files

  1. pyproject.toml
[tool.poetry]
name = "poetry-demo"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"