clock-pattern 0.1.0__tar.gz → 0.2.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.
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/PKG-INFO +1 -1
- clock_pattern-0.2.0/clock_pattern/__init__.py +1 -0
- clock_pattern-0.2.0/clock_pattern/clocks/__init__.py +7 -0
- clock_pattern-0.2.0/clock_pattern/clocks/utc_clock.py +37 -0
- clock_pattern-0.1.0/clock_pattern/__init__.py +0 -1
- clock_pattern-0.1.0/clock_pattern/clocks/__init__.py +0 -3
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/.gitignore +0 -0
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/LICENSE.md +0 -0
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/README.md +0 -0
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/clock_pattern/clocks/system_clock.py +0 -0
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/clock_pattern/models/__init__.py +0 -0
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/clock_pattern/models/clock.py +0 -0
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/clock_pattern/py.typed +0 -0
- {clock_pattern-0.1.0 → clock_pattern-0.2.0}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clock-pattern
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: The Clock Pattern is a Python package that turns time into an injectable dependency.
|
|
5
5
|
Project-URL: Homepage, https://github.com/adriamontoto/clock-pattern
|
|
6
6
|
Project-URL: Repository, https://github.com/adriamontoto/clock-pattern
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.2.0'
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""
|
|
2
|
+
UtcClock module.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from datetime import UTC
|
|
6
|
+
|
|
7
|
+
from .system_clock import SystemClock
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UtcClock(SystemClock):
|
|
11
|
+
"""
|
|
12
|
+
UtcClock class is responsible of retrieving the current UTC date/datetime.
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
```python
|
|
16
|
+
from clock_pattern.clocks import UtcClock
|
|
17
|
+
|
|
18
|
+
clock = UtcClock()
|
|
19
|
+
print(clock.now())
|
|
20
|
+
# >>> 2025-06-16 13:57:26.210964+00:00
|
|
21
|
+
```
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
def __init__(self) -> None:
|
|
25
|
+
"""
|
|
26
|
+
UtcClock constructor.
|
|
27
|
+
|
|
28
|
+
Example:
|
|
29
|
+
```python
|
|
30
|
+
from clock_pattern.clocks import UtcClock
|
|
31
|
+
|
|
32
|
+
clock = UtcClock()
|
|
33
|
+
print(clock.now())
|
|
34
|
+
# >>> 2025-06-16 13:57:26.210964+00:00
|
|
35
|
+
```
|
|
36
|
+
"""
|
|
37
|
+
super().__init__(timezone=UTC)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.1.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|