sharepoint-cli-rs 0.0.4__py3-none-win_amd64.whl
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.
- sharepoint_cli/__init__.py +8 -0
- sharepoint_cli/__main__.py +50 -0
- sharepoint_cli/py.typed +0 -0
- sharepoint_cli_rs-0.0.4.data/scripts/sharepoint.exe +0 -0
- sharepoint_cli_rs-0.0.4.dist-info/METADATA +93 -0
- sharepoint_cli_rs-0.0.4.dist-info/RECORD +8 -0
- sharepoint_cli_rs-0.0.4.dist-info/WHEEL +4 -0
- sharepoint_cli_rs-0.0.4.dist-info/sboms/sharepoint-cli.cyclonedx.json +5641 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Command-line entry point for sharepoint-cli.
|
|
2
|
+
|
|
3
|
+
Locates the native Rust binary installed alongside this package by maturin
|
|
4
|
+
and execs it with the user's arguments.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import shutil
|
|
11
|
+
import subprocess
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def find_native_binary() -> str:
|
|
17
|
+
bin_dir = Path(sys.executable).parent
|
|
18
|
+
for name in ("sharepoint", "sharepoint.exe"):
|
|
19
|
+
candidate = bin_dir / name
|
|
20
|
+
if candidate.is_file():
|
|
21
|
+
return str(candidate)
|
|
22
|
+
|
|
23
|
+
found = shutil.which("sharepoint")
|
|
24
|
+
if found:
|
|
25
|
+
return found
|
|
26
|
+
|
|
27
|
+
raise FileNotFoundError(
|
|
28
|
+
"Could not find the native sharepoint binary. "
|
|
29
|
+
"Please ensure sharepoint-cli is installed correctly."
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def main() -> int:
|
|
34
|
+
try:
|
|
35
|
+
native_binary = find_native_binary()
|
|
36
|
+
args = [native_binary] + sys.argv[1:]
|
|
37
|
+
|
|
38
|
+
if sys.platform == "win32":
|
|
39
|
+
completed_process = subprocess.run(args)
|
|
40
|
+
return completed_process.returncode
|
|
41
|
+
else:
|
|
42
|
+
os.execv(native_binary, args)
|
|
43
|
+
return 0
|
|
44
|
+
except FileNotFoundError as e:
|
|
45
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
46
|
+
return 1
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if __name__ == "__main__":
|
|
50
|
+
sys.exit(main())
|
sharepoint_cli/py.typed
ADDED
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sharepoint-cli-rs
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Intended Audience :: System Administrators
|
|
7
|
+
Classifier: Intended Audience :: Developers
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Rust
|
|
12
|
+
Classifier: Topic :: Office/Business
|
|
13
|
+
Summary: Agent-friendly SharePoint Online CLI with JSON output, structured exit codes, and schema introspection
|
|
14
|
+
Home-Page: https://github.com/rvben/sharepoint-cli
|
|
15
|
+
Author-email: Ruben Jongejan <ruben.jongejan@gmail.com>
|
|
16
|
+
License: MIT
|
|
17
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
19
|
+
Project-URL: Homepage, https://github.com/rvben/sharepoint-cli
|
|
20
|
+
Project-URL: Repository, https://github.com/rvben/sharepoint-cli.git
|
|
21
|
+
|
|
22
|
+
# sharepoint-cli
|
|
23
|
+
|
|
24
|
+
Agent-friendly SharePoint Online CLI with JSON output, structured exit codes, and schema introspection.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
### From crates.io
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
cargo install sharepoint-cli
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### From PyPI
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pip install sharepoint-cli-rs
|
|
38
|
+
# or
|
|
39
|
+
uv tool install sharepoint-cli-rs
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### From source
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
git clone https://github.com/rvben/sharepoint-cli
|
|
46
|
+
cd sharepoint-cli
|
|
47
|
+
cargo install --path .
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Quick start
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
# First-time setup: configures tenant + default site, then signs in
|
|
54
|
+
sharepoint init
|
|
55
|
+
|
|
56
|
+
# Or sign in to an already-configured profile
|
|
57
|
+
sharepoint auth login
|
|
58
|
+
|
|
59
|
+
# List followed sites
|
|
60
|
+
sharepoint sites list
|
|
61
|
+
|
|
62
|
+
# List libraries in a site
|
|
63
|
+
sharepoint drives list <site>
|
|
64
|
+
|
|
65
|
+
# Browse a library
|
|
66
|
+
sharepoint files ls <site>:<library>/
|
|
67
|
+
|
|
68
|
+
# Stat / download / search
|
|
69
|
+
sharepoint files stat <site>:<library>/path/to/file
|
|
70
|
+
sharepoint files download <site>:<library>/path/to/file -o ./out.bin
|
|
71
|
+
sharepoint files find <site>:<library>/ --name '*.pdf'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Output
|
|
75
|
+
|
|
76
|
+
- Human output on stdout, status messages on stderr.
|
|
77
|
+
- `--json` (or non-TTY stdout) emits machine-readable JSON on stdout.
|
|
78
|
+
- `--quiet` suppresses status messages.
|
|
79
|
+
|
|
80
|
+
## Configuration
|
|
81
|
+
|
|
82
|
+
Config lives at `$XDG_CONFIG_HOME/sharepoint/config.toml` (or `~/.config/sharepoint/config.toml`). Run `sharepoint config path` to print the resolved location.
|
|
83
|
+
|
|
84
|
+
Environment overrides:
|
|
85
|
+
|
|
86
|
+
- `SHAREPOINT_PROFILE` — active profile name
|
|
87
|
+
- `SHAREPOINT_TENANT_ID` — tenant override
|
|
88
|
+
- `SHAREPOINT_CLIENT_ID` — Azure AD application ID
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
MIT
|
|
93
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
sharepoint_cli/__init__.py,sha256=GikeDfWfpw2Ry4FwqRoBzQpoOB2Yt9YHXXIBpnRLi4E,274
|
|
2
|
+
sharepoint_cli/__main__.py,sha256=gtV_aduQyzLtCH9mzdx5zbk5GRjNodRf0shHIWYeewQ,1275
|
|
3
|
+
sharepoint_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
sharepoint_cli_rs-0.0.4.data/scripts/sharepoint.exe,sha256=suhO8z1KeSSLMNMN5Yf3WghaP2vWMYqyhxZfdQfvv18,5832192
|
|
5
|
+
sharepoint_cli_rs-0.0.4.dist-info/METADATA,sha256=kgX91cp1ZFwB0xMWMtnO8-ss7u-5mijC2XhI5UQ8YTc,2489
|
|
6
|
+
sharepoint_cli_rs-0.0.4.dist-info/WHEEL,sha256=0cg7uMdVM1SNK0ih4zFWnV0wsxqvcArlTmRGOaRhEnw,94
|
|
7
|
+
sharepoint_cli_rs-0.0.4.dist-info/sboms/sharepoint-cli.cyclonedx.json,sha256=Lhd6RblNDBxguYJf9WkI8RCXU8VwRyI0rx0hE72_qys,180125
|
|
8
|
+
sharepoint_cli_rs-0.0.4.dist-info/RECORD,,
|