python-sdk-remote 0.0.185b3295__tar.gz → 0.0.187b3515__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.
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/PKG-INFO +1 -1
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/datetime_range.py +23 -1
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote.egg-info/PKG-INFO +1 -1
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/setup.py +2 -2
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/README.md +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/pyproject.toml +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/__init__.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/constants.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/constants_src_mini_logger_and_logger.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/environment_variable_exception.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/filename.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/generic_crud.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/http_response.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/is_test_data.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/item.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/mini_logger.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/our_obfuscation.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/our_object.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/our_objects.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/our_objects_local.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/our_objects_remote.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/our_request.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/our_request_old.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/unified_json.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/utilities.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/valid_json_versions.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/validate_environment.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/version.py +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote.egg-info/SOURCES.txt +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote.egg-info/dependency_links.txt +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote.egg-info/requires.txt +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote.egg-info/top_level.txt +0 -0
- {python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/setup.cfg +0 -0
|
@@ -6,9 +6,12 @@ as requested in the TODO.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from datetime import datetime, timedelta
|
|
9
|
-
from typing import Optional
|
|
9
|
+
from typing import Optional, Union
|
|
10
10
|
|
|
11
11
|
from .mini_logger import MiniLogger as logger
|
|
12
|
+
from .utilities import to_datetime
|
|
13
|
+
|
|
14
|
+
# TODO Move datetime_range function from python-sdk-local to pythin-sdk-remote datetime_range.py
|
|
12
15
|
|
|
13
16
|
|
|
14
17
|
class DatetimeRange:
|
|
@@ -125,3 +128,22 @@ class DatetimeRange:
|
|
|
125
128
|
start_dt = datetime.fromisoformat(data["start_datetime"])
|
|
126
129
|
end_dt = datetime.fromisoformat(data["end_datetime"])
|
|
127
130
|
return cls(start_dt, end_dt)
|
|
131
|
+
|
|
132
|
+
@classmethod
|
|
133
|
+
def from_start_and_end(cls, start_datetime: Union[datetime, str],
|
|
134
|
+
end_datetime: Union[datetime, str]) -> 'DatetimeRange':
|
|
135
|
+
"""
|
|
136
|
+
Create DatetimeRange from a start and an end, each a datetime or an ISO-8601 string.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
start_datetime: The start of the range, a datetime or an ISO-8601 string
|
|
140
|
+
end_datetime: The end of the range, a datetime or an ISO-8601 string
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
DatetimeRange: New DatetimeRange instance
|
|
144
|
+
|
|
145
|
+
Raises:
|
|
146
|
+
ValueError: If a string is not ISO-8601, or the start is after the end
|
|
147
|
+
"""
|
|
148
|
+
datetime_range_result = cls(to_datetime(start_datetime), to_datetime(end_datetime))
|
|
149
|
+
return datetime_range_result
|
|
@@ -8,9 +8,9 @@ package_dir = PACKAGE_NAME.replace("-", "_")
|
|
|
8
8
|
setuptools.setup(
|
|
9
9
|
name=PACKAGE_NAME,
|
|
10
10
|
# Every feature branch needs its own free beta: PyPI never accepts a version twice, and
|
|
11
|
-
# dev's literal is always one that has already been published.
|
|
11
|
+
# dev's literal is always one that has already been published. b3515 is this branch's
|
|
12
12
|
# Jira id. GA stays a [pub] commit on dev.
|
|
13
|
-
version='0.0.
|
|
13
|
+
version='0.0.187b3515', # https://pypi.org/project/python-sdk-remote#history
|
|
14
14
|
author="Circles",
|
|
15
15
|
author_email="info@circlez.ai",
|
|
16
16
|
description="PyPI Package for Circles Python SDK Local Python",
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/__init__.py
RENAMED
|
File without changes
|
{python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/filename.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/item.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/utilities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.185b3295 → python_sdk_remote-0.0.187b3515}/python_sdk_remote/src/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|