apisync 1.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.
- apisync-1.0.0/LICENSE +21 -0
- apisync-1.0.0/PKG-INFO +38 -0
- apisync-1.0.0/README.md +21 -0
- apisync-1.0.0/pyproject.toml +3 -0
- apisync-1.0.0/setup.cfg +34 -0
- apisync-1.0.0/src/apisync/__init__.py +3 -0
- apisync-1.0.0/src/apisync/sync.py +60 -0
- apisync-1.0.0/src/apisync.egg-info/PKG-INFO +38 -0
- apisync-1.0.0/src/apisync.egg-info/SOURCES.txt +12 -0
- apisync-1.0.0/src/apisync.egg-info/dependency_links.txt +1 -0
- apisync-1.0.0/src/apisync.egg-info/entry_points.txt +2 -0
- apisync-1.0.0/src/apisync.egg-info/requires.txt +1 -0
- apisync-1.0.0/src/apisync.egg-info/top_level.txt +1 -0
apisync-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Asinerum Conlang Project
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
apisync-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: apisync
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Literp Sync Tool for Data Handshake
|
|
5
|
+
Home-page: https://github.com/asinerum/apisync
|
|
6
|
+
Author: Asinerum Conlang Project
|
|
7
|
+
Author-email: asinerum.com@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: apishake>=1.0.1
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# Literp Sync Tool for Data Handshake
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
```bash
|
|
22
|
+
## bash
|
|
23
|
+
pip install apishake apisync
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
```bash
|
|
28
|
+
#!/bin/bash
|
|
29
|
+
export ACCESS_CODE="remote-password"
|
|
30
|
+
export SYNC_FOLDER="shares"
|
|
31
|
+
export SERVER_URL="http://192.168.1.2:7577"
|
|
32
|
+
apisync
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Detailed tips, tricks, and examples, can be found at project's repository
|
|
36
|
+
https://github.com/asinerum/apisync
|
|
37
|
+
|
|
38
|
+
(C)2026 Asinerum Conlang Project
|
apisync-1.0.0/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Literp Sync Tool for Data Handshake
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
```bash
|
|
5
|
+
## bash
|
|
6
|
+
pip install apishake apisync
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
```bash
|
|
11
|
+
#!/bin/bash
|
|
12
|
+
export ACCESS_CODE="remote-password"
|
|
13
|
+
export SYNC_FOLDER="shares"
|
|
14
|
+
export SERVER_URL="http://192.168.1.2:7577"
|
|
15
|
+
apisync
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Detailed tips, tricks, and examples, can be found at project's repository
|
|
19
|
+
https://github.com/asinerum/apisync
|
|
20
|
+
|
|
21
|
+
(C)2026 Asinerum Conlang Project
|
apisync-1.0.0/setup.cfg
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = apisync
|
|
3
|
+
version = 1.0.0
|
|
4
|
+
author = Asinerum Conlang Project
|
|
5
|
+
author_email = asinerum.com@gmail.com
|
|
6
|
+
description = Literp Sync Tool for Data Handshake
|
|
7
|
+
long_description = file: README.md
|
|
8
|
+
long_description_content_type = text/markdown
|
|
9
|
+
url = https://github.com/asinerum/apisync
|
|
10
|
+
license = MIT
|
|
11
|
+
classifiers =
|
|
12
|
+
Programming Language :: Python :: 3
|
|
13
|
+
License :: OSI Approved :: MIT License
|
|
14
|
+
Operating System :: OS Independent
|
|
15
|
+
|
|
16
|
+
[options]
|
|
17
|
+
package_dir =
|
|
18
|
+
= src
|
|
19
|
+
packages = find:
|
|
20
|
+
python_requires = >=3.7
|
|
21
|
+
install_requires =
|
|
22
|
+
apishake >= 1.0.1
|
|
23
|
+
|
|
24
|
+
[options.packages.find]
|
|
25
|
+
where = src
|
|
26
|
+
|
|
27
|
+
[options.entry_points]
|
|
28
|
+
console_scripts =
|
|
29
|
+
apisync = apisync.sync:main
|
|
30
|
+
|
|
31
|
+
[egg_info]
|
|
32
|
+
tag_build =
|
|
33
|
+
tag_date = 0
|
|
34
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Dependencies:
|
|
3
|
+
## bash
|
|
4
|
+
pip install apishake apisync
|
|
5
|
+
Run tool:
|
|
6
|
+
## bash shell
|
|
7
|
+
export ACCESS_CODE="remote-password"
|
|
8
|
+
export SYNC_FOLDER="shares"
|
|
9
|
+
export SERVER_URL="http://192.168.1.2:7577"
|
|
10
|
+
apisync
|
|
11
|
+
## or
|
|
12
|
+
apisync [SYNC_FOLDER] [SERVER_URL]
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import sys
|
|
16
|
+
|
|
17
|
+
## this includes: os, Path, load_dotenv()
|
|
18
|
+
from apishake import * ## ACCESS_CODE
|
|
19
|
+
from apishake.receiver import *
|
|
20
|
+
|
|
21
|
+
ACCESS_CODE = os.getenv('ACCESS_CODE', '')
|
|
22
|
+
|
|
23
|
+
DEF_FOLDER = "shares"
|
|
24
|
+
if len(sys.argv) > 1: DEF_FOLDER = sys.argv[1]
|
|
25
|
+
|
|
26
|
+
DEF_SERVER = "http://localhost:7577"
|
|
27
|
+
if len(sys.argv) > 2: DEF_SERVER = sys.argv[2]
|
|
28
|
+
|
|
29
|
+
SERVER_URL = os.getenv('SERVER_URL', DEF_SERVER)
|
|
30
|
+
SYNC_FOLDER = os.getenv('SYNC_FOLDER', DEF_FOLDER)
|
|
31
|
+
|
|
32
|
+
def create_folder(path: str):
|
|
33
|
+
Path(path).mkdir(parents=True, exist_ok=True)
|
|
34
|
+
|
|
35
|
+
def receive_file(file: str, folder: str):
|
|
36
|
+
rec = receive(url=SERVER_URL, file=file, folder=folder, code=ACCESS_CODE)
|
|
37
|
+
if rec:
|
|
38
|
+
print(f"Success: {file}")
|
|
39
|
+
else:
|
|
40
|
+
print(f"Error: {file}")
|
|
41
|
+
|
|
42
|
+
def sync_folder(folder: str):
|
|
43
|
+
create_folder(folder)
|
|
44
|
+
files = ls(url=SERVER_URL, folder=folder, code=ACCESS_CODE)
|
|
45
|
+
for file in files:
|
|
46
|
+
receive_file(file, folder=folder)
|
|
47
|
+
sub_folders = ls(url=SERVER_URL, folder=folder, code=ACCESS_CODE, typ="dir")
|
|
48
|
+
if not len(sub_folders): return
|
|
49
|
+
for sub_folder in sub_folders:
|
|
50
|
+
sync_folder(f"{folder}/{sub_folder}")
|
|
51
|
+
|
|
52
|
+
def main():
|
|
53
|
+
try:
|
|
54
|
+
sync_folder(SYNC_FOLDER)
|
|
55
|
+
print("Done")
|
|
56
|
+
except Exception as e:
|
|
57
|
+
print(f"Error: {e}")
|
|
58
|
+
|
|
59
|
+
if __name__ == '__main__':
|
|
60
|
+
main()
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: apisync
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Literp Sync Tool for Data Handshake
|
|
5
|
+
Home-page: https://github.com/asinerum/apisync
|
|
6
|
+
Author: Asinerum Conlang Project
|
|
7
|
+
Author-email: asinerum.com@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: apishake>=1.0.1
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# Literp Sync Tool for Data Handshake
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
```bash
|
|
22
|
+
## bash
|
|
23
|
+
pip install apishake apisync
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
```bash
|
|
28
|
+
#!/bin/bash
|
|
29
|
+
export ACCESS_CODE="remote-password"
|
|
30
|
+
export SYNC_FOLDER="shares"
|
|
31
|
+
export SERVER_URL="http://192.168.1.2:7577"
|
|
32
|
+
apisync
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Detailed tips, tricks, and examples, can be found at project's repository
|
|
36
|
+
https://github.com/asinerum/apisync
|
|
37
|
+
|
|
38
|
+
(C)2026 Asinerum Conlang Project
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.cfg
|
|
5
|
+
src/apisync/__init__.py
|
|
6
|
+
src/apisync/sync.py
|
|
7
|
+
src/apisync.egg-info/PKG-INFO
|
|
8
|
+
src/apisync.egg-info/SOURCES.txt
|
|
9
|
+
src/apisync.egg-info/dependency_links.txt
|
|
10
|
+
src/apisync.egg-info/entry_points.txt
|
|
11
|
+
src/apisync.egg-info/requires.txt
|
|
12
|
+
src/apisync.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
apishake>=1.0.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
apisync
|