Skip to content

Instantly share code, notes, and snippets.

@gabriel-ss
Created July 12, 2022 13:56
Show Gist options
  • Save gabriel-ss/0011e0b9174e5ed00c9d4f5634055b06 to your computer and use it in GitHub Desktop.
Save gabriel-ss/0011e0b9174e5ed00c9d4f5634055b06 to your computer and use it in GitHub Desktop.
Poetry dependency example
[tool.poetry]
name = "dep-with-extras"
version = "0.1.0"
description = "dep-with-extras"
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "~3.9"
fastapi = {version = "^0.70.1", optional = true}
PyJWT = {version = "^2.3.0", optional = true}
[tool.poetry.extras]
api = ["fastapi"]
auth = ["pyJWT"]
backend = ["fastapi", "PyJWT"]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment