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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clock-pattern
3
- Version: 0.1.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,7 @@
1
+ from .system_clock import SystemClock
2
+ from .utc_clock import UtcClock
3
+
4
+ __all__ = (
5
+ 'SystemClock',
6
+ 'UtcClock',
7
+ )
@@ -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'
@@ -1,3 +0,0 @@
1
- from .system_clock import SystemClock
2
-
3
- __all__ = ('SystemClock',)
File without changes
File without changes
File without changes