divbase-cli 0.1.0__py3-none-any.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.
divbase_cli/utils.py ADDED
@@ -0,0 +1,28 @@
1
+ """Collection of utility functions for divbase-cli package that haven't found a better home"""
2
+
3
+ import csv
4
+ import sys
5
+
6
+ from rich.table import Table
7
+
8
+
9
+ def print_rich_table_as_tsv(table: Table) -> None:
10
+ """
11
+ Helper function to print a rich Table as a TSV file to standard output.
12
+
13
+ This is useful for CLI commands that want to offer both rich table output
14
+ for human users as well as TSV output for programmatic parsing.
15
+
16
+ NOTE: This function expects all table rows to be of same length (you can have None values in cells).
17
+ """
18
+ writer = csv.writer(sys.stdout, delimiter="\t", lineterminator="\n")
19
+
20
+ headers = [str(col.header) for col in table.columns]
21
+ writer.writerow(headers)
22
+
23
+ columns_data = [col._cells for col in table.columns]
24
+
25
+ num_rows = min(len(col) for col in columns_data)
26
+ for row_index in range(num_rows):
27
+ row = [str(columns_data[col_index][row_index]) for col_index in range(len(columns_data))]
28
+ writer.writerow(row)
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.5
2
+ Name: divbase-cli
3
+ Version: 0.1.0
4
+ Summary: Command Line Interface for Divbase
5
+ Project-URL: Homepage, https://divbase.scilifelab-2-prod.sys.kth.se
6
+ Project-URL: Documentation, https://scilifelabdatacentre.github.io/divbase
7
+ Project-URL: Repository, https://github.com/ScilifelabDataCentre/divbase
8
+ Project-URL: Issues, https://github.com/ScilifelabDataCentre/divbase/issues
9
+ Author-email: SciLifeLab Data Centre <datacentre@scilifelab.se>
10
+ License-Expression: MIT
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Requires-Python: >=3.12
21
+ Requires-Dist: divbase-lib==0.1.0
22
+ Requires-Dist: keyring==25.7.0
23
+ Requires-Dist: typer==0.27.2
24
+ Description-Content-Type: text/markdown
25
+
26
+ # divbase-cli
27
+
28
+ Command Line Interface for Divbase.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pipx install divbase-cli
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ```bash
39
+ divbase --help # can also run divbase-cli --help
40
+ ```
41
+
42
+ ## Development
43
+
44
+ This package is developed in the [DivBase repository](https://github.com/ScilifelabDataCentre/divbase) by Scilifelab Data Centre.
@@ -0,0 +1,28 @@
1
+ divbase_cli/__init__.py,sha256=kUR5RAFc7HCeiqdlX36dZOHkUI5wI6V_43RpEcD8b-0,22
2
+ divbase_cli/cli_config.py,sha256=KTeEF650w8PO6NEBGWXfmdItnYYZZLF8IwCqlgKC6i0,3186
3
+ divbase_cli/cli_exceptions.py,sha256=EncPltlmUZewnFQ6QCSriw_V9qBJaM8kqohgwYyTT5A,7569
4
+ divbase_cli/config_resolver.py,sha256=sS9rShBr_k9_EGJhocZ2HmDnRo1yW9sLLpHX8zy4nww,3401
5
+ divbase_cli/display_task_history.py,sha256=ofZio9DQbXCG6azvGgFrQv7jC_X-afxm55bajlE4-1A,7804
6
+ divbase_cli/divbase_cli.py,sha256=gIREqjqLFHRrs0MCi2wzcjmmYAJ7L3K5qZWYSimqMto,3187
7
+ divbase_cli/retries.py,sha256=93zfQ5c3uted_X1mb-5OCSGpCU_QfH3L5bkOZz0VYBo,1813
8
+ divbase_cli/user_auth.py,sha256=jod4vTBhla91I2Ynyb-e-7KIyDnVq3JGe6GP1_G7rzA,20128
9
+ divbase_cli/user_config.py,sha256=gS85w947Coa65BzeJrEVDPMzeeRKMRwHCYhJlROSxjg,6320
10
+ divbase_cli/utils.py,sha256=2HZffCZcowpYPeiNv4nm9qZz5Eq0mUYNmUgXNTWtkbw,983
11
+ divbase_cli/cli_commands/__init__.py,sha256=K_2r8V1QGpEmxDcD2QOyWlXR4HPoc16yytmZwGkIyLw,166
12
+ divbase_cli/cli_commands/auth_cli.py,sha256=vRHB8nr1ciAu5odTMA_Ld172N0bv9bR5cgPdvB7I33M,6777
13
+ divbase_cli/cli_commands/dimensions_cli.py,sha256=FQGo3LPvEWuzK8_Ux5qBgHaajVv015hkrMpAeb8IfTc,18626
14
+ divbase_cli/cli_commands/file_cli.py,sha256=i-avAumcICRWFDp8tIrsHr5_Cfkgz2_GTvPGhhKkckw,48073
15
+ divbase_cli/cli_commands/query_cli.py,sha256=57KSosLaQ7e5wAulBKFxIzBuvQbxF_TMlPfqVAvof8I,17819
16
+ divbase_cli/cli_commands/shared_args_options.py,sha256=Sx90yjjkWGiM1p-f-KmKd85z76Kzk-0-ekxiD8h_zfg,953
17
+ divbase_cli/cli_commands/task_history_cli.py,sha256=WywtxbydhleNLzNRcg8DArR4WtHAVCC7NKeWXVINcYU,4522
18
+ divbase_cli/cli_commands/user_config_cli.py,sha256=XfjRg51Ak3nsqgyT8aPtNU2U2k3ycUy7-zaaHzUumAo,6123
19
+ divbase_cli/cli_commands/version_cli.py,sha256=CdIVU7dfyPebm3cF4woyDh20ssCfynPFz_qyrHP7Ru4,8691
20
+ divbase_cli/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ divbase_cli/services/announcements.py,sha256=EYXoHaAcZmzNm3ezgLVi81DQFn3qecZVlIuNHvpQq_c,1531
22
+ divbase_cli/services/pre_signed_urls.py,sha256=WfJgiGWs6HE46DDwdJrzYNAxQiz1QISF9fpR-14PUj0,19179
23
+ divbase_cli/services/project_versions.py,sha256=LwDjJCKPGJl1fAv5GSQ7aTOrEfrpzn3IVLwR-b10C9k,3628
24
+ divbase_cli/services/s3_files.py,sha256=1uACAw-3u7FAFrZn9kMNEevxAz0DOY8YrAQssZMIRi0,21952
25
+ divbase_cli-0.1.0.dist-info/METADATA,sha256=srzhdmDvwN5fift2GVwudNnzBYZeunvSHsFI23jiPJA,1391
26
+ divbase_cli-0.1.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
27
+ divbase_cli-0.1.0.dist-info/entry_points.txt,sha256=U4l9q6SebrFeGx3m8qA5bM_-Y-5KpTPUdFHhFoVUSU8,61
28
+ divbase_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ divbase-cli = divbase_cli.divbase_cli:main