1Password / onepassword-sdk-python

https://developer.1password.com/docs/sdks/
MIT License
86 stars 10 forks source link

Switch recommended installation method to leveraging git via HTTP #112

Closed hculea closed 2 months ago

hculea commented 2 months ago

The currently recommended installation method (via SSH) only works if the user has an SSH key configured.

This is likely not the case in all environments, such as Docker containers, so we should switch to an installation method that does not make any assumption's about the user's setup.

AndyTitu commented 2 months ago

Functionally tested and the download over https works as well.

Some additional thoughts:

For example, here's my pyproject.toml file using poetry as build backend:

[tool.poetry]
name = "poetry-demo"
version = "0.1.0"
description = ""
authors = ["AndyTitu <andi.titu@agilebits.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
onepassword = {git = "ssh://git@github.com/1Password/onepassword-sdk-python.git", rev = "v0.1.1"}

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

And we can only mention the line:

# Add this to your pyproject.toml dependencies section
onepassword = {git = "ssh://git@github.com/1Password/onepassword-sdk-python.git", rev = "v0.1.1"}
hculea commented 2 months ago

@AndyTitu I think installing via SSH only makes sense in the situation where the repository is private, and authentication needs to be enforced in some way.

IMO we should proceed with this change as is - There are definitely improvements to make to these doc further, but I would prefer that we take this on when upgrading these docs to reference support for PyPI, which we hope to get out soon, to not have to go about these changes twice. WDYT?