pylego 0.1.9__tar.gz → 0.1.24__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pylego
3
- Version: 0.1.9
3
+ Version: 0.1.24
4
4
  Summary: A python wrapper package for the lego application written in Golang
5
5
  Author-email: Canonical <telco-engineers@lists.canonical.com>
6
6
  Project-URL: Homepage, https://github.com/canonical/pylego
@@ -8,13 +8,10 @@ Project-URL: Issues, https://github.com/canonical/pylego/issues
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.8
11
+ Requires-Python: >=3.13.3
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Provides-Extra: test
15
- Requires-Dist: pytest; extra == "test"
16
- Requires-Dist: requests; extra == "test"
17
- Requires-Dist: ruff; extra == "test"
14
+ Dynamic: license-file
18
15
 
19
16
  # pylego
20
17
 
@@ -37,16 +34,17 @@ You can import the lego command and run any function that you can run from the C
37
34
  ```python
38
35
  from pylego import run_lego_command
39
36
  test_env = {"NAMECHEAP_API_USER": "user", "NAMECHEAP_API_KEY": "key"}
40
- run_lego_command("something@gmail.com", "https://localhost/directory", "-----BEGIN CERTIFICATE REQUEST----- ...", "namecheap", test_env)
37
+ run_lego_command("something@gmail.com", "https://localhost/directory", "-----BEGIN CERTIFICATE REQUEST----- ...", "namecheap", test_env, "-----BEGIN RSA PRIVATE KEY-----")
41
38
  ```
42
39
 
43
40
  | Argument | Description |
44
41
  | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
45
- | `email` | The provided email will be registered to LetsEncrypt. It may receive some emails notifying the user about certificate expiry. |
42
+ | `email` | The provided email will be registered to the ACME server. It may receive some emails notifying the user about certificate expiry. |
46
43
  | `server` | This is the full URL of a server that implements the ACME protocol. While letsencrypt is the most common one, there are other programs that provide this facility like Vault. |
47
44
  | `csr` | This must be a PEM string in bytes that is user generated and valid as according to the ACME server that is being provided above. Many providers have different requirements for what is allowed to be in the fields of the CSR. |
48
45
  | `plugin` | The plugin is a string that's supported by LEGO. The full list is located [here](https://go-acme.github.io/lego/dns/). On top of the LEGO provided ones, we have an extra plugin called `http` that will allow users to use HTTP01 and TLSALPN01 challenges. |
49
46
  | `env` | The env is a dictionary mapping of strings to strings that will be loaded into the environment for LEGO to use. All plugins require some configuration values loaded into the environment. You can find them [here](https://go-acme.github.io/lego/dns/) |
47
+ | `private_key` | The provided private key will be used to register the user to the ACME server (not the key that signed the CSR), if not provided pylego will generate a new one |
50
48
 
51
49
  On top of the environment variables that LEGO supports, we have some extra ones that we use to configure the library:
52
50
 
@@ -19,16 +19,17 @@ You can import the lego command and run any function that you can run from the C
19
19
  ```python
20
20
  from pylego import run_lego_command
21
21
  test_env = {"NAMECHEAP_API_USER": "user", "NAMECHEAP_API_KEY": "key"}
22
- run_lego_command("something@gmail.com", "https://localhost/directory", "-----BEGIN CERTIFICATE REQUEST----- ...", "namecheap", test_env)
22
+ run_lego_command("something@gmail.com", "https://localhost/directory", "-----BEGIN CERTIFICATE REQUEST----- ...", "namecheap", test_env, "-----BEGIN RSA PRIVATE KEY-----")
23
23
  ```
24
24
 
25
25
  | Argument | Description |
26
26
  | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
27
- | `email` | The provided email will be registered to LetsEncrypt. It may receive some emails notifying the user about certificate expiry. |
27
+ | `email` | The provided email will be registered to the ACME server. It may receive some emails notifying the user about certificate expiry. |
28
28
  | `server` | This is the full URL of a server that implements the ACME protocol. While letsencrypt is the most common one, there are other programs that provide this facility like Vault. |
29
29
  | `csr` | This must be a PEM string in bytes that is user generated and valid as according to the ACME server that is being provided above. Many providers have different requirements for what is allowed to be in the fields of the CSR. |
30
30
  | `plugin` | The plugin is a string that's supported by LEGO. The full list is located [here](https://go-acme.github.io/lego/dns/). On top of the LEGO provided ones, we have an extra plugin called `http` that will allow users to use HTTP01 and TLSALPN01 challenges. |
31
31
  | `env` | The env is a dictionary mapping of strings to strings that will be loaded into the environment for LEGO to use. All plugins require some configuration values loaded into the environment. You can find them [here](https://go-acme.github.io/lego/dns/) |
32
+ | `private_key` | The provided private key will be used to register the user to the ACME server (not the key that signed the CSR), if not provided pylego will generate a new one |
32
33
 
33
34
  On top of the environment variables that LEGO supports, we have some extra ones that we use to configure the library:
34
35
 
@@ -1,20 +1,20 @@
1
1
  [project]
2
2
  name = "pylego"
3
- version = "0.1.9"
3
+ version = "0.1.24"
4
4
  authors = [
5
5
  { name="Canonical", email="telco-engineers@lists.canonical.com" },
6
6
  ]
7
7
  description = "A python wrapper package for the lego application written in Golang"
8
8
  readme = "README.md"
9
- requires-python = ">=3.8"
9
+ requires-python = ">=3.13.3"
10
10
  classifiers = [
11
11
  "Programming Language :: Python :: 3",
12
12
  "License :: OSI Approved :: Apache Software License",
13
13
  "Operating System :: OS Independent",
14
14
  ]
15
15
 
16
- [project.optional-dependencies]
17
- test = [
16
+ [dependency-groups]
17
+ dev = [
18
18
  "pytest",
19
19
  "requests",
20
20
  "ruff"
@@ -25,7 +25,7 @@ Homepage = "https://github.com/canonical/pylego"
25
25
  Issues = "https://github.com/canonical/pylego/issues"
26
26
 
27
27
  [build-system]
28
- requires = ["setuptools>=61.0"]
28
+ requires = ["setuptools>=80.8.0"]
29
29
  build-backend = "setuptools.build_meta"
30
30
 
31
31
  [tool.setuptools]
@@ -73,3 +73,6 @@ per-file-ignores = {"tests/*" = ["D100","D101","D102","D103","D104"]}
73
73
 
74
74
  [tool.ruff.lint.mccabe]
75
75
  max-complexity = 10
76
+
77
+ [tool.uv]
78
+ package = true
@@ -0,0 +1,198 @@
1
+ module github.com/canonical/pylego
2
+
3
+ go 1.23.0
4
+
5
+ toolchain go1.24.3
6
+
7
+ require github.com/go-acme/lego/v4 v4.23.1
8
+
9
+ require (
10
+ cloud.google.com/go/auth v0.15.0 // indirect
11
+ cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
12
+ cloud.google.com/go/compute/metadata v0.6.0 // indirect
13
+ github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 // indirect
14
+ github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
15
+ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.1 // indirect
16
+ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 // indirect
17
+ github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
18
+ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 // indirect
19
+ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.3.0 // indirect
20
+ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 // indirect
21
+ github.com/Azure/go-autorest v14.2.0+incompatible // indirect
22
+ github.com/Azure/go-autorest/autorest v0.11.30 // indirect
23
+ github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
24
+ github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 // indirect
25
+ github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
26
+ github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
27
+ github.com/Azure/go-autorest/autorest/to v0.4.1 // indirect
28
+ github.com/Azure/go-autorest/logger v0.2.1 // indirect
29
+ github.com/Azure/go-autorest/tracing v0.6.0 // indirect
30
+ github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect
31
+ github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 // indirect
32
+ github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2 // indirect
33
+ github.com/aliyun/alibaba-cloud-sdk-go v1.63.100 // indirect
34
+ github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
35
+ github.com/aws/aws-sdk-go-v2/config v1.29.9 // indirect
36
+ github.com/aws/aws-sdk-go-v2/credentials v1.17.62 // indirect
37
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect
38
+ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
39
+ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
40
+ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
41
+ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
42
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect
43
+ github.com/aws/aws-sdk-go-v2/service/lightsail v1.43.1 // indirect
44
+ github.com/aws/aws-sdk-go-v2/service/route53 v1.50.0 // indirect
45
+ github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 // indirect
46
+ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect
47
+ github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect
48
+ github.com/aws/smithy-go v1.22.2 // indirect
49
+ github.com/baidubce/bce-sdk-go v0.9.223 // indirect
50
+ github.com/benbjohnson/clock v1.3.0 // indirect
51
+ github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
52
+ github.com/cenkalti/backoff/v4 v4.3.0 // indirect
53
+ github.com/civo/civogo v0.3.11 // indirect
54
+ github.com/cloudflare/cloudflare-go v0.115.0 // indirect
55
+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
56
+ github.com/dimchansky/utfbom v1.1.1 // indirect
57
+ github.com/dnsimple/dnsimple-go v1.7.0 // indirect
58
+ github.com/exoscale/egoscale/v3 v3.1.13 // indirect
59
+ github.com/fatih/structs v1.1.0 // indirect
60
+ github.com/felixge/httpsnoop v1.0.4 // indirect
61
+ github.com/fsnotify/fsnotify v1.8.0 // indirect
62
+ github.com/gabriel-vasile/mimetype v1.4.2 // indirect
63
+ github.com/ghodss/yaml v1.0.0 // indirect
64
+ github.com/go-errors/errors v1.0.1 // indirect
65
+ github.com/go-jose/go-jose/v4 v4.0.5 // indirect
66
+ github.com/go-logr/logr v1.4.2 // indirect
67
+ github.com/go-logr/stdr v1.2.2 // indirect
68
+ github.com/go-playground/locales v0.14.1 // indirect
69
+ github.com/go-playground/universal-translator v0.18.1 // indirect
70
+ github.com/go-playground/validator/v10 v10.16.0 // indirect
71
+ github.com/go-resty/resty/v2 v2.16.5 // indirect
72
+ github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
73
+ github.com/goccy/go-json v0.10.5 // indirect
74
+ github.com/gofrs/flock v0.12.1 // indirect
75
+ github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
76
+ github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
77
+ github.com/google/go-querystring v1.1.0 // indirect
78
+ github.com/google/s2a-go v0.1.9 // indirect
79
+ github.com/google/uuid v1.6.0 // indirect
80
+ github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
81
+ github.com/googleapis/gax-go/v2 v2.14.1 // indirect
82
+ github.com/gophercloud/gophercloud v1.14.1 // indirect
83
+ github.com/gophercloud/utils v0.0.0-20231010081019-80377eca5d56 // indirect
84
+ github.com/hashicorp/errwrap v1.0.0 // indirect
85
+ github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
86
+ github.com/hashicorp/go-multierror v1.1.1 // indirect
87
+ github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
88
+ github.com/hashicorp/go-uuid v1.0.3 // indirect
89
+ github.com/hashicorp/hcl v1.0.0 // indirect
90
+ github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.141 // indirect
91
+ github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df // indirect
92
+ github.com/infobloxopen/infoblox-go-client v1.1.1 // indirect
93
+ github.com/infobloxopen/infoblox-go-client/v2 v2.9.0 // indirect
94
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
95
+ github.com/json-iterator/go v1.1.12 // indirect
96
+ github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 // indirect
97
+ github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect
98
+ github.com/kylelemons/godebug v1.1.0 // indirect
99
+ github.com/labbsr0x/bindman-dns-webhook v1.0.2 // indirect
100
+ github.com/labbsr0x/goh v1.0.1 // indirect
101
+ github.com/leodido/go-urn v1.2.4 // indirect
102
+ github.com/linode/linodego v1.48.1 // indirect
103
+ github.com/liquidweb/liquidweb-cli v0.6.9 // indirect
104
+ github.com/liquidweb/liquidweb-go v1.6.4 // indirect
105
+ github.com/magiconair/properties v1.8.7 // indirect
106
+ github.com/mattn/go-isatty v0.0.20 // indirect
107
+ github.com/miekg/dns v1.1.64 // indirect
108
+ github.com/mimuret/golang-iij-dpf v0.9.1 // indirect
109
+ github.com/mitchellh/go-homedir v1.1.0 // indirect
110
+ github.com/mitchellh/mapstructure v1.5.0 // indirect
111
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
112
+ github.com/modern-go/reflect2 v1.0.2 // indirect
113
+ github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04 // indirect
114
+ github.com/nrdcg/auroradns v1.1.0 // indirect
115
+ github.com/nrdcg/bunny-go v0.0.0-20240207213615-dde5bf4577a3 // indirect
116
+ github.com/nrdcg/desec v0.10.0 // indirect
117
+ github.com/nrdcg/dnspod-go v0.4.0 // indirect
118
+ github.com/nrdcg/freemyip v0.3.0 // indirect
119
+ github.com/nrdcg/goacmedns v0.2.0 // indirect
120
+ github.com/nrdcg/goinwx v0.10.0 // indirect
121
+ github.com/nrdcg/mailinabox v0.2.0 // indirect
122
+ github.com/nrdcg/namesilo v0.2.1 // indirect
123
+ github.com/nrdcg/nodion v0.1.0 // indirect
124
+ github.com/nrdcg/porkbun v0.4.0 // indirect
125
+ github.com/nzdjb/go-metaname v1.0.0 // indirect
126
+ github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
127
+ github.com/oracle/oci-go-sdk/v65 v65.87.0 // indirect
128
+ github.com/ovh/go-ovh v1.7.0 // indirect
129
+ github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
130
+ github.com/pelletier/go-toml/v2 v2.1.0 // indirect
131
+ github.com/peterhellberg/link v1.2.0 // indirect
132
+ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
133
+ github.com/pkg/errors v0.9.1 // indirect
134
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
135
+ github.com/pquerna/otp v1.4.0 // indirect
136
+ github.com/regfish/regfish-dnsapi-go v0.1.1 // indirect
137
+ github.com/sacloud/api-client-go v0.2.10 // indirect
138
+ github.com/sacloud/go-http v0.1.8 // indirect
139
+ github.com/sacloud/iaas-api-go v1.14.0 // indirect
140
+ github.com/sacloud/packages-go v0.0.10 // indirect
141
+ github.com/sagikazarmark/locafero v0.4.0 // indirect
142
+ github.com/sagikazarmark/slog-shim v0.1.0 // indirect
143
+ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32 // indirect
144
+ github.com/selectel/domains-go v1.1.0 // indirect
145
+ github.com/selectel/go-selvpcclient/v3 v3.2.1 // indirect
146
+ github.com/shopspring/decimal v1.3.1 // indirect
147
+ github.com/sirupsen/logrus v1.9.3 // indirect
148
+ github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect
149
+ github.com/softlayer/softlayer-go v1.1.7 // indirect
150
+ github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e // indirect
151
+ github.com/sony/gobreaker v0.5.0 // indirect
152
+ github.com/sourcegraph/conc v0.3.0 // indirect
153
+ github.com/spf13/afero v1.11.0 // indirect
154
+ github.com/spf13/cast v1.6.0 // indirect
155
+ github.com/spf13/pflag v1.0.5 // indirect
156
+ github.com/spf13/viper v1.18.2 // indirect
157
+ github.com/stretchr/testify v1.10.0 // indirect
158
+ github.com/subosito/gotenv v1.6.0 // indirect
159
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1128 // indirect
160
+ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1128 // indirect
161
+ github.com/tjfoc/gmsm v1.4.1 // indirect
162
+ github.com/transip/gotransip/v6 v6.26.0 // indirect
163
+ github.com/ultradns/ultradns-go-sdk v1.8.0-20241010134910-243eeec // indirect
164
+ github.com/vinyldns/go-vinyldns v0.9.16 // indirect
165
+ github.com/volcengine/volc-sdk-golang v1.0.199 // indirect
166
+ github.com/vultr/govultr/v3 v3.17.0 // indirect
167
+ github.com/yandex-cloud/go-genproto v0.0.0-20250319153614-fb9d3e5eb01a // indirect
168
+ github.com/yandex-cloud/go-sdk v0.0.0-20250320143332-9cbcfc5de4ae // indirect
169
+ go.mongodb.org/mongo-driver v1.13.1 // indirect
170
+ go.opentelemetry.io/auto/sdk v1.1.0 // indirect
171
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
172
+ go.opentelemetry.io/otel v1.34.0 // indirect
173
+ go.opentelemetry.io/otel/metric v1.34.0 // indirect
174
+ go.opentelemetry.io/otel/trace v1.34.0 // indirect
175
+ go.uber.org/atomic v1.9.0 // indirect
176
+ go.uber.org/multierr v1.9.0 // indirect
177
+ go.uber.org/ratelimit v0.3.0 // indirect
178
+ golang.org/x/crypto v0.36.0 // indirect
179
+ golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect
180
+ golang.org/x/mod v0.23.0 // indirect
181
+ golang.org/x/net v0.38.0 // indirect
182
+ golang.org/x/oauth2 v0.28.0 // indirect
183
+ golang.org/x/sync v0.12.0 // indirect
184
+ golang.org/x/sys v0.31.0 // indirect
185
+ golang.org/x/text v0.23.0 // indirect
186
+ golang.org/x/time v0.11.0 // indirect
187
+ golang.org/x/tools v0.30.0 // indirect
188
+ google.golang.org/api v0.227.0 // indirect
189
+ google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 // indirect
190
+ google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
191
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect
192
+ google.golang.org/grpc v1.71.0 // indirect
193
+ google.golang.org/protobuf v1.36.5 // indirect
194
+ gopkg.in/ini.v1 v1.67.0 // indirect
195
+ gopkg.in/ns1/ns1-go.v2 v2.13.0 // indirect
196
+ gopkg.in/yaml.v2 v2.4.0 // indirect
197
+ gopkg.in/yaml.v3 v3.0.1 // indirect
198
+ )