smart-dynamic-path 1.0.1__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.
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Alexander Suvorov
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.4
2
+ Name: smart-dynamic-path
3
+ Version: 1.0.1
4
+ Summary: Dynamic, deterministic, time-dependent path generation. No storage. No database. No dependencies. One secret phrase → one deterministic path per time period. Same phrase + same day = same path. No storage. No database. Just pure math.
5
+ Author-email: Alexander Suvorov <smartlegionlab@gmail.com>
6
+ License: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/smartlegionlab/smart-dynamic-path
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.7
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Topic :: Security
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Dynamic: license-file
21
+
22
+ # Smart Dynamic Path <sup>v1.0.1</sup>
23
+
24
+ **Dynamic, deterministic, time-dependent path generation. No storage. No database. No dependencies.**
25
+
26
+ Generate cryptographically secure paths that change automatically based on time (day, month, hour) from a secret phrase.
27
+ Perfect for hiding admin panels, creating temporary access links, or building time-based API keys.
28
+
29
+ ---
30
+
31
+ [![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/smart-dynamic-path)](https://github.com/smartlegionlab/smart-dynamic-path/)
32
+ ![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/smart-dynamic-path)
33
+ [![GitHub](https://img.shields.io/github/license/smartlegionlab/smart-dynamic-path)](https://github.com/smartlegionlab/smart-dynamic-path/blob/master/LICENSE)
34
+ [![GitHub stars](https://img.shields.io/github/stars/smartlegionlab/smart-dynamic-path?style=social)](https://github.com/smartlegionlab/smart-dynamic-path/stargazers)
35
+ [![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/smart-dynamic-path?style=social)](https://github.com/smartlegionlab/smart-dynamic-path/network/members)
36
+
37
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/smart-dynamic-path?label=pypi%20downloads)](https://pypi.org/project/smart-dynamic-path/)
38
+ [![PyPI](https://img.shields.io/pypi/v/smart-dynamic-path)](https://pypi.org/project/smart-dynamic-path)
39
+ [![PyPI - Format](https://img.shields.io/pypi/format/smart-dynamic-path)](https://pypi.org/project/smart-dynamic-path)
40
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path)](https://pepy.tech/projects/smart-dynamic-path)
41
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path/month)](https://pepy.tech/projects/smart-dynamic-path)
42
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path/week)](https://pepy.tech/projects/smart-dynamic-path)
43
+
44
+ ---
45
+
46
+ ## Core idea
47
+
48
+ One secret phrase → one deterministic path per time period. Same phrase + same day = same path. No storage. No database. Just pure math.
49
+
50
+ ---
51
+
52
+ ## Disclaimer
53
+
54
+ **By using this software, you agree to the full disclaimer terms.**
55
+
56
+ **Summary:** Software provided "AS IS" without warranty. You assume all risks.
57
+
58
+ **Full legal disclaimer:** See [DISCLAIMER.md](https://github.com/smartlegionlab/smart-dynamic-path/blob/master/DISCLAIMER.md)
59
+
60
+ ---
61
+
62
+ ## Use cases
63
+
64
+ - Hide Django admin: `/admin/a1b2c3d4e5f6g7h8/`
65
+ - Temporary download links that expire after a day
66
+ - Time-rotating API endpoints
67
+ - "Secret room" pattern for any web framework
68
+
69
+ and others...
70
+
71
+ ## Local usage without installation
72
+
73
+ ```bash
74
+ git clone https://github.com/smartlegionlab/smart-dynamic-path
75
+ cd smart-dynamic-path
76
+
77
+ python -m smart_dynamic_path.cli --secret "my secret phrase"
78
+ python -m smart_dynamic_path.cli --secret "my secret phrase" --period month --full
79
+ python -m smart_dynamic_path.cli --secret "my secret phrase" --key-only
80
+ ```
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install smart-dynamic-path
86
+ ```
87
+
88
+ ## Quick start
89
+
90
+ ```python
91
+ from smart_dynamic_path import generate_path, secret_to_path
92
+
93
+ # Generate path from secret key
94
+ path = generate_path(secret_key='your_64_hex_secret_key', period='day')
95
+ # Output: "4e30939634dfc6617f10a2f8fe259f44"
96
+
97
+ # With prefix
98
+ path = generate_path(secret_key='...', period='day', prefix='admin')
99
+ # Output: "admin/4ab3b83e39bbb1d7e31e0978ea8cea05"
100
+
101
+ # From secret phrase (local use only)
102
+ key, path = secret_to_path('my secret phrase', period='day')
103
+ ```
104
+
105
+ ## CLI commands
106
+
107
+ | Command | Output |
108
+ |--------------------------------------------------------------|------------------------------|
109
+ | `smart-dynamic-path --secret "secret"` | Full info (key + path + URL) |
110
+ | `smart-dynamic-path --secret "secret" --key-only` | Only SECRET_KEY (64 hex) |
111
+ | `smart-dynamic-path --secret "secret" --path-only` | Only path (32 hex) |
112
+ | `smart-dynamic-path --secret "secret" --full` | Only full URL `/xxxx/` |
113
+ | `smart-dynamic-path --secret "secret" --period month --full` | Monthly rotation |
114
+ | `smart-dynamic-path --secret "secret" --prefix admin --full` | With prefix |
115
+
116
+ ## Python API
117
+
118
+ ```python
119
+ from smart_dynamic_path import generate_secret_key, generate_path, secret_to_path
120
+
121
+ # From secret phrase
122
+ key = generate_secret_key("my secret phrase")
123
+ path = generate_path(key, period='day')
124
+ key, path = secret_to_path("my secret phrase", period='day')
125
+ ```
126
+
127
+ ## How it works
128
+
129
+ ```
130
+ SECRET_KEY = SHA256(secret_phrase) # 64 hex chars (256 bits)
131
+ PATH = SHA256(SECRET_KEY + date)[:16].hex() # 32 hex chars (128 bits)
132
+ ```
133
+
134
+ - Secret phrase → SECRET_KEY (256 bits)
135
+ - SECRET_KEY + current date/time → path (128 bits)
136
+ - Path changes automatically based on period (day/month/hour/static)
137
+
138
+ ## Implemented paradigms
139
+
140
+ ### 1. Pointer‑Based Security
141
+ The path is not stored anywhere. It is regenerated on demand from a secret phrase and current time. There is no stored "pointer" — only the ability to compute it.
142
+
143
+ **DOI:** [10.5281/zenodo.17204738](https://doi.org/10.5281/zenodo.17204738)
144
+
145
+ ### 2. Local Data Regeneration
146
+ The exact path is computed locally on the developer's machine using only the secret phrase and date, without accessing any server.
147
+
148
+ **DOI:** [10.5281/zenodo.17264327](https://doi.org/10.5281/zenodo.17264327)
149
+
150
+ ### 3. Position‑Candidate‑Hypothesis (PCH)
151
+ Among all possible paths (2¹²⁸ candidates), only one specific path generated by the secret phrase is valid at any given time.
152
+
153
+ **DOI:** [10.5281/zenodo.17614888](https://doi.org/10.5281/zenodo.17614888)
154
+
155
+ ## Security
156
+
157
+ - No storage — paths are regenerated, not stored
158
+ - Deterministic — same input always produces same output
159
+ - 32 hex chars = 2¹²⁸ possible paths (no brute force)
160
+ - Time-based rotation limits exposure window
161
+
162
+ ## License
163
+
164
+ BSD-3-Clause
165
+
166
+ ## Author
167
+
168
+ Alexander Suvorov [@smartlegionlab](https://github.com/smartlegionlab)
@@ -0,0 +1,147 @@
1
+ # Smart Dynamic Path <sup>v1.0.1</sup>
2
+
3
+ **Dynamic, deterministic, time-dependent path generation. No storage. No database. No dependencies.**
4
+
5
+ Generate cryptographically secure paths that change automatically based on time (day, month, hour) from a secret phrase.
6
+ Perfect for hiding admin panels, creating temporary access links, or building time-based API keys.
7
+
8
+ ---
9
+
10
+ [![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/smart-dynamic-path)](https://github.com/smartlegionlab/smart-dynamic-path/)
11
+ ![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/smart-dynamic-path)
12
+ [![GitHub](https://img.shields.io/github/license/smartlegionlab/smart-dynamic-path)](https://github.com/smartlegionlab/smart-dynamic-path/blob/master/LICENSE)
13
+ [![GitHub stars](https://img.shields.io/github/stars/smartlegionlab/smart-dynamic-path?style=social)](https://github.com/smartlegionlab/smart-dynamic-path/stargazers)
14
+ [![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/smart-dynamic-path?style=social)](https://github.com/smartlegionlab/smart-dynamic-path/network/members)
15
+
16
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/smart-dynamic-path?label=pypi%20downloads)](https://pypi.org/project/smart-dynamic-path/)
17
+ [![PyPI](https://img.shields.io/pypi/v/smart-dynamic-path)](https://pypi.org/project/smart-dynamic-path)
18
+ [![PyPI - Format](https://img.shields.io/pypi/format/smart-dynamic-path)](https://pypi.org/project/smart-dynamic-path)
19
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path)](https://pepy.tech/projects/smart-dynamic-path)
20
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path/month)](https://pepy.tech/projects/smart-dynamic-path)
21
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path/week)](https://pepy.tech/projects/smart-dynamic-path)
22
+
23
+ ---
24
+
25
+ ## Core idea
26
+
27
+ One secret phrase → one deterministic path per time period. Same phrase + same day = same path. No storage. No database. Just pure math.
28
+
29
+ ---
30
+
31
+ ## Disclaimer
32
+
33
+ **By using this software, you agree to the full disclaimer terms.**
34
+
35
+ **Summary:** Software provided "AS IS" without warranty. You assume all risks.
36
+
37
+ **Full legal disclaimer:** See [DISCLAIMER.md](https://github.com/smartlegionlab/smart-dynamic-path/blob/master/DISCLAIMER.md)
38
+
39
+ ---
40
+
41
+ ## Use cases
42
+
43
+ - Hide Django admin: `/admin/a1b2c3d4e5f6g7h8/`
44
+ - Temporary download links that expire after a day
45
+ - Time-rotating API endpoints
46
+ - "Secret room" pattern for any web framework
47
+
48
+ and others...
49
+
50
+ ## Local usage without installation
51
+
52
+ ```bash
53
+ git clone https://github.com/smartlegionlab/smart-dynamic-path
54
+ cd smart-dynamic-path
55
+
56
+ python -m smart_dynamic_path.cli --secret "my secret phrase"
57
+ python -m smart_dynamic_path.cli --secret "my secret phrase" --period month --full
58
+ python -m smart_dynamic_path.cli --secret "my secret phrase" --key-only
59
+ ```
60
+
61
+ ## Installation
62
+
63
+ ```bash
64
+ pip install smart-dynamic-path
65
+ ```
66
+
67
+ ## Quick start
68
+
69
+ ```python
70
+ from smart_dynamic_path import generate_path, secret_to_path
71
+
72
+ # Generate path from secret key
73
+ path = generate_path(secret_key='your_64_hex_secret_key', period='day')
74
+ # Output: "4e30939634dfc6617f10a2f8fe259f44"
75
+
76
+ # With prefix
77
+ path = generate_path(secret_key='...', period='day', prefix='admin')
78
+ # Output: "admin/4ab3b83e39bbb1d7e31e0978ea8cea05"
79
+
80
+ # From secret phrase (local use only)
81
+ key, path = secret_to_path('my secret phrase', period='day')
82
+ ```
83
+
84
+ ## CLI commands
85
+
86
+ | Command | Output |
87
+ |--------------------------------------------------------------|------------------------------|
88
+ | `smart-dynamic-path --secret "secret"` | Full info (key + path + URL) |
89
+ | `smart-dynamic-path --secret "secret" --key-only` | Only SECRET_KEY (64 hex) |
90
+ | `smart-dynamic-path --secret "secret" --path-only` | Only path (32 hex) |
91
+ | `smart-dynamic-path --secret "secret" --full` | Only full URL `/xxxx/` |
92
+ | `smart-dynamic-path --secret "secret" --period month --full` | Monthly rotation |
93
+ | `smart-dynamic-path --secret "secret" --prefix admin --full` | With prefix |
94
+
95
+ ## Python API
96
+
97
+ ```python
98
+ from smart_dynamic_path import generate_secret_key, generate_path, secret_to_path
99
+
100
+ # From secret phrase
101
+ key = generate_secret_key("my secret phrase")
102
+ path = generate_path(key, period='day')
103
+ key, path = secret_to_path("my secret phrase", period='day')
104
+ ```
105
+
106
+ ## How it works
107
+
108
+ ```
109
+ SECRET_KEY = SHA256(secret_phrase) # 64 hex chars (256 bits)
110
+ PATH = SHA256(SECRET_KEY + date)[:16].hex() # 32 hex chars (128 bits)
111
+ ```
112
+
113
+ - Secret phrase → SECRET_KEY (256 bits)
114
+ - SECRET_KEY + current date/time → path (128 bits)
115
+ - Path changes automatically based on period (day/month/hour/static)
116
+
117
+ ## Implemented paradigms
118
+
119
+ ### 1. Pointer‑Based Security
120
+ The path is not stored anywhere. It is regenerated on demand from a secret phrase and current time. There is no stored "pointer" — only the ability to compute it.
121
+
122
+ **DOI:** [10.5281/zenodo.17204738](https://doi.org/10.5281/zenodo.17204738)
123
+
124
+ ### 2. Local Data Regeneration
125
+ The exact path is computed locally on the developer's machine using only the secret phrase and date, without accessing any server.
126
+
127
+ **DOI:** [10.5281/zenodo.17264327](https://doi.org/10.5281/zenodo.17264327)
128
+
129
+ ### 3. Position‑Candidate‑Hypothesis (PCH)
130
+ Among all possible paths (2¹²⁸ candidates), only one specific path generated by the secret phrase is valid at any given time.
131
+
132
+ **DOI:** [10.5281/zenodo.17614888](https://doi.org/10.5281/zenodo.17614888)
133
+
134
+ ## Security
135
+
136
+ - No storage — paths are regenerated, not stored
137
+ - Deterministic — same input always produces same output
138
+ - 32 hex chars = 2¹²⁸ possible paths (no brute force)
139
+ - Time-based rotation limits exposure window
140
+
141
+ ## License
142
+
143
+ BSD-3-Clause
144
+
145
+ ## Author
146
+
147
+ Alexander Suvorov [@smartlegionlab](https://github.com/smartlegionlab)
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "smart-dynamic-path"
7
+ version = "1.0.1"
8
+ description = "Dynamic, deterministic, time-dependent path generation. No storage. No database. No dependencies. One secret phrase → one deterministic path per time period. Same phrase + same day = same path. No storage. No database. Just pure math."
9
+ authors = [
10
+ {name = "Alexander Suvorov", email = "smartlegionlab@gmail.com"}
11
+ ]
12
+ license = {text = "BSD-3-Clause"}
13
+ readme = "README.md"
14
+ requires-python = ">=3.7"
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.7",
18
+ "Programming Language :: Python :: 3.8",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Operating System :: OS Independent",
24
+ "Topic :: Security",
25
+ ]
26
+ dependencies = []
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/smartlegionlab/smart-dynamic-path"
30
+
31
+ [project.scripts]
32
+ smart-dynamic-path = "smart_dynamic_path.cli:main"
33
+
34
+ [tool.setuptools.packages.find]
35
+ where = ["."]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,9 @@
1
+ # Copyright (©) 2026, Alexander Suvorov. All rights reserved.
2
+ __version__ = '1.0.1'
3
+ __all__ = [
4
+ 'generate_secret_key',
5
+ 'generate_path',
6
+ 'secret_to_path',
7
+ ]
8
+
9
+ from smart_dynamic_path.core import generate_secret_key, generate_path, secret_to_path
@@ -0,0 +1,50 @@
1
+ # Copyright (©) 2026, Alexander Suvorov. All rights reserved.
2
+ """
3
+ Smart Dynamic Path CLI — Local key and path generation from a secret phrase
4
+
5
+ Installation: pip install smart-dynamic-path
6
+ Usage:
7
+ smart-dynamic-path --secret "my secret phrase"
8
+ smart-dynamic-path --secret "my secret phrase" --period month --full
9
+ """
10
+
11
+ import argparse
12
+ from smart_dynamic_path.core import secret_to_path, get_full_path
13
+
14
+
15
+ def main():
16
+ parser = argparse.ArgumentParser(
17
+ prog='smart-dynamic-path',
18
+ description='Generate deterministic time-based paths from a secret phrase'
19
+ )
20
+ parser.add_argument('--secret', '-s', required=True, help='Secret phrase')
21
+ parser.add_argument('--period', '-P', default='day',
22
+ choices=['day', 'month', 'hour', 'static'],
23
+ help='Path change period (default: day)')
24
+ parser.add_argument('--prefix', '-p', default='',
25
+ help='Optional path prefix')
26
+ parser.add_argument('--full', '-f', action='store_true',
27
+ help='Show full URL path')
28
+ parser.add_argument('--key-only', '-k', action='store_true',
29
+ help='Show only SECRET_KEY')
30
+ parser.add_argument('--path-only', '-a', action='store_true',
31
+ help='Show only path')
32
+
33
+ args = parser.parse_args()
34
+
35
+ secret_key, path = secret_to_path(args.secret, args.period, args.prefix)
36
+
37
+ if args.key_only:
38
+ print(secret_key)
39
+ elif args.path_only:
40
+ print(path)
41
+ elif args.full:
42
+ print(get_full_path(secret_key, args.period, args.prefix))
43
+ else:
44
+ print(f"SECRET_KEY: {secret_key}")
45
+ print(f"Path: {path}")
46
+ print(f"Full URL: {get_full_path(secret_key, args.period, args.prefix)}")
47
+
48
+
49
+ if __name__ == '__main__':
50
+ main()
@@ -0,0 +1,75 @@
1
+ # Copyright (©) 2026, Alexander Suvorov. All rights reserved.
2
+ import hashlib
3
+ from datetime import datetime
4
+
5
+
6
+ def generate_secret_key(secret: str) -> str:
7
+ """
8
+ Generate SECRET_KEY from secret phrase.
9
+
10
+ Args:
11
+ secret: Secret phrase
12
+
13
+ Returns:
14
+ 64 hex chars (256 bits)
15
+ """
16
+ return hashlib.sha256(secret.encode()).hexdigest()
17
+
18
+
19
+ def generate_path(secret_key: str, period: str = 'day', prefix: str = '') -> str:
20
+ """
21
+ Generate deterministic time-based path.
22
+
23
+ Args:
24
+ secret_key: 64 hex chars (256 bits) from generate_secret_key()
25
+ period: 'day', 'month', 'hour', 'static'
26
+ prefix: Optional path prefix (e.g., 'admin')
27
+
28
+ Returns:
29
+ 32 hex chars path or "prefix/path"
30
+ """
31
+ now = datetime.now()
32
+
33
+ if period == 'day':
34
+ key = now.strftime("%Y-%m-%d")
35
+ elif period == 'month':
36
+ key = now.strftime("%Y-%m")
37
+ elif period == 'hour':
38
+ key = now.strftime("%Y-%m-%d-%H")
39
+ else:
40
+ key = 'static'
41
+
42
+ h = hashlib.sha256(f"{secret_key}_{key}".encode()).digest()
43
+ path_hash = h[:16].hex()
44
+
45
+ if prefix:
46
+ return f"{prefix}/{path_hash}"
47
+ return path_hash
48
+
49
+
50
+ def secret_to_path(secret: str, period: str = 'day', prefix: str = '') -> tuple:
51
+ """
52
+ Convert secret phrase to (secret_key, path).
53
+
54
+ Args:
55
+ secret: Secret phrase
56
+ period: 'day', 'month', 'hour', 'static'
57
+ prefix: Optional path prefix
58
+
59
+ Returns:
60
+ (secret_key, path) tuple
61
+ """
62
+ key = generate_secret_key(secret)
63
+ path = generate_path(key, period, prefix)
64
+ return key, path
65
+
66
+
67
+ def get_full_path(secret_key: str, period: str = 'day', prefix: str = '') -> str:
68
+ """
69
+ Get full path with leading slash.
70
+
71
+ Returns:
72
+ Full path like "/admin/a1b2c3d4e5f6g7h8/"
73
+ """
74
+ path = generate_path(secret_key, period, prefix)
75
+ return f"/{path}/"
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.4
2
+ Name: smart-dynamic-path
3
+ Version: 1.0.1
4
+ Summary: Dynamic, deterministic, time-dependent path generation. No storage. No database. No dependencies. One secret phrase → one deterministic path per time period. Same phrase + same day = same path. No storage. No database. Just pure math.
5
+ Author-email: Alexander Suvorov <smartlegionlab@gmail.com>
6
+ License: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/smartlegionlab/smart-dynamic-path
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.7
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Topic :: Security
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Dynamic: license-file
21
+
22
+ # Smart Dynamic Path <sup>v1.0.1</sup>
23
+
24
+ **Dynamic, deterministic, time-dependent path generation. No storage. No database. No dependencies.**
25
+
26
+ Generate cryptographically secure paths that change automatically based on time (day, month, hour) from a secret phrase.
27
+ Perfect for hiding admin panels, creating temporary access links, or building time-based API keys.
28
+
29
+ ---
30
+
31
+ [![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/smart-dynamic-path)](https://github.com/smartlegionlab/smart-dynamic-path/)
32
+ ![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/smart-dynamic-path)
33
+ [![GitHub](https://img.shields.io/github/license/smartlegionlab/smart-dynamic-path)](https://github.com/smartlegionlab/smart-dynamic-path/blob/master/LICENSE)
34
+ [![GitHub stars](https://img.shields.io/github/stars/smartlegionlab/smart-dynamic-path?style=social)](https://github.com/smartlegionlab/smart-dynamic-path/stargazers)
35
+ [![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/smart-dynamic-path?style=social)](https://github.com/smartlegionlab/smart-dynamic-path/network/members)
36
+
37
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/smart-dynamic-path?label=pypi%20downloads)](https://pypi.org/project/smart-dynamic-path/)
38
+ [![PyPI](https://img.shields.io/pypi/v/smart-dynamic-path)](https://pypi.org/project/smart-dynamic-path)
39
+ [![PyPI - Format](https://img.shields.io/pypi/format/smart-dynamic-path)](https://pypi.org/project/smart-dynamic-path)
40
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path)](https://pepy.tech/projects/smart-dynamic-path)
41
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path/month)](https://pepy.tech/projects/smart-dynamic-path)
42
+ [![PyPI Downloads](https://static.pepy.tech/badge/smart-dynamic-path/week)](https://pepy.tech/projects/smart-dynamic-path)
43
+
44
+ ---
45
+
46
+ ## Core idea
47
+
48
+ One secret phrase → one deterministic path per time period. Same phrase + same day = same path. No storage. No database. Just pure math.
49
+
50
+ ---
51
+
52
+ ## Disclaimer
53
+
54
+ **By using this software, you agree to the full disclaimer terms.**
55
+
56
+ **Summary:** Software provided "AS IS" without warranty. You assume all risks.
57
+
58
+ **Full legal disclaimer:** See [DISCLAIMER.md](https://github.com/smartlegionlab/smart-dynamic-path/blob/master/DISCLAIMER.md)
59
+
60
+ ---
61
+
62
+ ## Use cases
63
+
64
+ - Hide Django admin: `/admin/a1b2c3d4e5f6g7h8/`
65
+ - Temporary download links that expire after a day
66
+ - Time-rotating API endpoints
67
+ - "Secret room" pattern for any web framework
68
+
69
+ and others...
70
+
71
+ ## Local usage without installation
72
+
73
+ ```bash
74
+ git clone https://github.com/smartlegionlab/smart-dynamic-path
75
+ cd smart-dynamic-path
76
+
77
+ python -m smart_dynamic_path.cli --secret "my secret phrase"
78
+ python -m smart_dynamic_path.cli --secret "my secret phrase" --period month --full
79
+ python -m smart_dynamic_path.cli --secret "my secret phrase" --key-only
80
+ ```
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install smart-dynamic-path
86
+ ```
87
+
88
+ ## Quick start
89
+
90
+ ```python
91
+ from smart_dynamic_path import generate_path, secret_to_path
92
+
93
+ # Generate path from secret key
94
+ path = generate_path(secret_key='your_64_hex_secret_key', period='day')
95
+ # Output: "4e30939634dfc6617f10a2f8fe259f44"
96
+
97
+ # With prefix
98
+ path = generate_path(secret_key='...', period='day', prefix='admin')
99
+ # Output: "admin/4ab3b83e39bbb1d7e31e0978ea8cea05"
100
+
101
+ # From secret phrase (local use only)
102
+ key, path = secret_to_path('my secret phrase', period='day')
103
+ ```
104
+
105
+ ## CLI commands
106
+
107
+ | Command | Output |
108
+ |--------------------------------------------------------------|------------------------------|
109
+ | `smart-dynamic-path --secret "secret"` | Full info (key + path + URL) |
110
+ | `smart-dynamic-path --secret "secret" --key-only` | Only SECRET_KEY (64 hex) |
111
+ | `smart-dynamic-path --secret "secret" --path-only` | Only path (32 hex) |
112
+ | `smart-dynamic-path --secret "secret" --full` | Only full URL `/xxxx/` |
113
+ | `smart-dynamic-path --secret "secret" --period month --full` | Monthly rotation |
114
+ | `smart-dynamic-path --secret "secret" --prefix admin --full` | With prefix |
115
+
116
+ ## Python API
117
+
118
+ ```python
119
+ from smart_dynamic_path import generate_secret_key, generate_path, secret_to_path
120
+
121
+ # From secret phrase
122
+ key = generate_secret_key("my secret phrase")
123
+ path = generate_path(key, period='day')
124
+ key, path = secret_to_path("my secret phrase", period='day')
125
+ ```
126
+
127
+ ## How it works
128
+
129
+ ```
130
+ SECRET_KEY = SHA256(secret_phrase) # 64 hex chars (256 bits)
131
+ PATH = SHA256(SECRET_KEY + date)[:16].hex() # 32 hex chars (128 bits)
132
+ ```
133
+
134
+ - Secret phrase → SECRET_KEY (256 bits)
135
+ - SECRET_KEY + current date/time → path (128 bits)
136
+ - Path changes automatically based on period (day/month/hour/static)
137
+
138
+ ## Implemented paradigms
139
+
140
+ ### 1. Pointer‑Based Security
141
+ The path is not stored anywhere. It is regenerated on demand from a secret phrase and current time. There is no stored "pointer" — only the ability to compute it.
142
+
143
+ **DOI:** [10.5281/zenodo.17204738](https://doi.org/10.5281/zenodo.17204738)
144
+
145
+ ### 2. Local Data Regeneration
146
+ The exact path is computed locally on the developer's machine using only the secret phrase and date, without accessing any server.
147
+
148
+ **DOI:** [10.5281/zenodo.17264327](https://doi.org/10.5281/zenodo.17264327)
149
+
150
+ ### 3. Position‑Candidate‑Hypothesis (PCH)
151
+ Among all possible paths (2¹²⁸ candidates), only one specific path generated by the secret phrase is valid at any given time.
152
+
153
+ **DOI:** [10.5281/zenodo.17614888](https://doi.org/10.5281/zenodo.17614888)
154
+
155
+ ## Security
156
+
157
+ - No storage — paths are regenerated, not stored
158
+ - Deterministic — same input always produces same output
159
+ - 32 hex chars = 2¹²⁸ possible paths (no brute force)
160
+ - Time-based rotation limits exposure window
161
+
162
+ ## License
163
+
164
+ BSD-3-Clause
165
+
166
+ ## Author
167
+
168
+ Alexander Suvorov [@smartlegionlab](https://github.com/smartlegionlab)
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ smart_dynamic_path/__init__.py
5
+ smart_dynamic_path/cli.py
6
+ smart_dynamic_path/core.py
7
+ smart_dynamic_path.egg-info/PKG-INFO
8
+ smart_dynamic_path.egg-info/SOURCES.txt
9
+ smart_dynamic_path.egg-info/dependency_links.txt
10
+ smart_dynamic_path.egg-info/entry_points.txt
11
+ smart_dynamic_path.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ smart-dynamic-path = smart_dynamic_path.cli:main
@@ -0,0 +1,2 @@
1
+ dist
2
+ smart_dynamic_path