dbt-copilot-python 1.0.0__tar.gz → 2.0.0__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,7 +1,8 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: dbt-copilot-python
3
- Version: 1.0.0
3
+ Version: 2.0.0
4
4
  Summary: Helper functions to run Django and Flask applications in AWS Copilot/ECS.
5
+ License-File: LICENSE
5
6
  Author: Department for Business and Trade Platform Team
6
7
  Author-email: sre-team@digital.trade.gov.uk
7
8
  Requires-Python: >=3.9,<4.0
@@ -10,12 +11,10 @@ Classifier: Programming Language :: Python :: 3.9
10
11
  Classifier: Programming Language :: Python :: 3.10
11
12
  Classifier: Programming Language :: Python :: 3.11
12
13
  Classifier: Programming Language :: Python :: 3.12
13
- Requires-Dist: celery (>=5.3.6,<6.0.0)
14
- Requires-Dist: opentelemetry-distro (==0.51b0)
15
- Requires-Dist: opentelemetry-exporter-otlp (==1.30.0)
16
- Requires-Dist: opentelemetry-instrumentation-wsgi (==0.51b0)
17
- Requires-Dist: opentelemetry-propagator-aws-xray (>=1.0.2,<2.0.0)
18
- Requires-Dist: opentelemetry-sdk-extension-aws (>=2.0.1,<3.0.0)
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Provides-Extra: celery
17
+ Requires-Dist: celery (>=5.0) ; extra == "celery"
19
18
  Requires-Dist: requests (>=2.32.3,<3.0.0)
20
19
  Description-Content-Type: text/markdown
21
20
 
@@ -29,7 +28,7 @@ A set of utility functions for running Django & Flask apps in AWS ECS via AWS Co
29
28
 
30
29
  ### Supported Python versions
31
30
 
32
- 3.9, 3.10, 3.11 and 3.12.
31
+ 3.9, 3.10, 3.11, 3.12 and 3.13.
33
32
 
34
33
  ### Installation
35
34
 
@@ -37,6 +36,36 @@ A set of utility functions for running Django & Flask apps in AWS ECS via AWS Co
37
36
  pip install dbt-copilot-python
38
37
  ```
39
38
 
39
+ #### With celery
40
+
41
+ If you are using celery, you should also install an appropriate version of celery using your project's package manager, or use our built-in extra.
42
+
43
+ ```shell
44
+ # Poetry
45
+ poetry add celery
46
+
47
+ # Pip
48
+ pip install celery
49
+ pip freeze | grep "^celery==" >> requirements.txt
50
+
51
+ # Pipenv
52
+ pipenv install celery
53
+ ```
54
+
55
+ **OR**
56
+
57
+ ```shell
58
+ # Poetry
59
+ poetry add dbt-copilot-python[celery]
60
+
61
+ # Pip
62
+ pip install dbt-copilot-python[celery]
63
+ pip freeze | grep "^celery==" >> requirements.txt
64
+
65
+ # Pipenv
66
+ pipenv install dbt-copilot-python[celery]
67
+ ```
68
+
40
69
  ### Usage
41
70
 
42
71
  #### `ALLOWED_HOSTS` setting
@@ -53,6 +82,8 @@ ALLOWED_HOSTS = setup_allowed_hosts(ALLOWED_HOSTS)
53
82
 
54
83
  #### Celery health check
55
84
 
85
+ Install the library [with celery](#with-celery).
86
+
56
87
  Add the health check in your application's Celery config file...
57
88
 
58
89
  ```python
@@ -144,11 +175,13 @@ To publish the Python package `dbt-copilot-python`, you will need an API token.
144
175
  Update the version, as the same version cannot be published to PyPi.
145
176
 
146
177
  ```shell
147
- poetry version patch|minor|major
178
+ poetry version patch
148
179
  ```
149
180
 
150
181
  More options for the `version` command can be found in the [Poetry documentation](https://python-poetry.org/docs/cli/#version). For example, for a minor version bump: `poetry version minor`.
151
182
 
183
+ Update the [CHANGELOG.md](/CHANGELOG.md) with details of the changes you've made.
184
+
152
185
  Build the Python package.
153
186
 
154
187
  ```shell
@@ -8,7 +8,7 @@ A set of utility functions for running Django & Flask apps in AWS ECS via AWS Co
8
8
 
9
9
  ### Supported Python versions
10
10
 
11
- 3.9, 3.10, 3.11 and 3.12.
11
+ 3.9, 3.10, 3.11, 3.12 and 3.13.
12
12
 
13
13
  ### Installation
14
14
 
@@ -16,6 +16,36 @@ A set of utility functions for running Django & Flask apps in AWS ECS via AWS Co
16
16
  pip install dbt-copilot-python
17
17
  ```
18
18
 
19
+ #### With celery
20
+
21
+ If you are using celery, you should also install an appropriate version of celery using your project's package manager, or use our built-in extra.
22
+
23
+ ```shell
24
+ # Poetry
25
+ poetry add celery
26
+
27
+ # Pip
28
+ pip install celery
29
+ pip freeze | grep "^celery==" >> requirements.txt
30
+
31
+ # Pipenv
32
+ pipenv install celery
33
+ ```
34
+
35
+ **OR**
36
+
37
+ ```shell
38
+ # Poetry
39
+ poetry add dbt-copilot-python[celery]
40
+
41
+ # Pip
42
+ pip install dbt-copilot-python[celery]
43
+ pip freeze | grep "^celery==" >> requirements.txt
44
+
45
+ # Pipenv
46
+ pipenv install dbt-copilot-python[celery]
47
+ ```
48
+
19
49
  ### Usage
20
50
 
21
51
  #### `ALLOWED_HOSTS` setting
@@ -32,6 +62,8 @@ ALLOWED_HOSTS = setup_allowed_hosts(ALLOWED_HOSTS)
32
62
 
33
63
  #### Celery health check
34
64
 
65
+ Install the library [with celery](#with-celery).
66
+
35
67
  Add the health check in your application's Celery config file...
36
68
 
37
69
  ```python
@@ -123,11 +155,13 @@ To publish the Python package `dbt-copilot-python`, you will need an API token.
123
155
  Update the version, as the same version cannot be published to PyPi.
124
156
 
125
157
  ```shell
126
- poetry version patch|minor|major
158
+ poetry version patch
127
159
  ```
128
160
 
129
161
  More options for the `version` command can be found in the [Poetry documentation](https://python-poetry.org/docs/cli/#version). For example, for a minor version bump: `poetry version minor`.
130
162
 
163
+ Update the [CHANGELOG.md](/CHANGELOG.md) with details of the changes you've made.
164
+
131
165
  Build the Python package.
132
166
 
133
167
  ```shell
@@ -3,7 +3,11 @@
3
3
  import sys
4
4
  from datetime import datetime
5
5
 
6
- from celery import signals
6
+ try:
7
+ from celery import signals
8
+ except ImportError:
9
+ raise RuntimeError("Install directly or with extras: celery or dbt-copilot-python[celery]")
10
+
7
11
  from dateutil.tz import tz
8
12
 
9
13
  from .const import HEARTBEAT_FILE
@@ -1,6 +1,10 @@
1
1
  from datetime import datetime
2
2
 
3
- from celery import bootsteps
3
+ try:
4
+ from celery import bootsteps
5
+ except ImportError:
6
+ raise RuntimeError("Install directly or with extras: celery or dbt-copilot-python[celery]")
7
+
4
8
  from dateutil.tz import tz
5
9
 
6
10
  from .const import HEARTBEAT_FILE
@@ -3,21 +3,21 @@ line-length = 100
3
3
 
4
4
  [tool.poetry]
5
5
  name = "dbt-copilot-python"
6
- version = "1.0.0"
6
+ version = "2.0.0"
7
7
  description = "Helper functions to run Django and Flask applications in AWS Copilot/ECS."
8
- authors = ["Department for Business and Trade Platform Team <sre-team@digital.trade.gov.uk>"]
8
+ authors = [
9
+ "Department for Business and Trade Platform Team <sre-team@digital.trade.gov.uk>",
10
+ ]
9
11
  readme = "README.md"
10
12
  packages = [{ include = "dbt_copilot_python" }]
11
13
 
12
14
  [tool.poetry.dependencies]
13
15
  python = "^3.9"
14
- celery = "^5.3.6"
15
- opentelemetry-distro = "0.51b0"
16
- opentelemetry-exporter-otlp = "1.30.0"
17
- opentelemetry-instrumentation-wsgi = "0.51b0"
18
- opentelemetry-propagator-aws-xray = "^1.0.2"
19
- opentelemetry-sdk-extension-aws = "^2.0.1"
20
16
  requests = "^2.32.3"
17
+ celery = { version = ">=5.0", optional = true }
18
+
19
+ [tool.poetry.extras]
20
+ celery = ["celery"]
21
21
 
22
22
  [tool.poetry.group.dev.dependencies]
23
23
  pre-commit = ">=3.3.3,<5.0.0"