Metadata-Version: 2.5
Name: bfabric_scripts
Version: 1.17.0
Summary: Python command line scripts for the B-Fabric API
Author: Aleksejs Fomins, Marco Schmidt, Maria d'Errico, Witold Eryk Wolski
Author-email: Christian Panse <cp@fgcz.ethz.ch>, Claudio Cannizzaro <claudio.cannizzaro@fgcz.uzh.ch>, Leonardo Schwarz <leonardo.schwarz@fgcz.ethz.ch>
Requires-Python: >=3.11
Requires-Dist: bfabric[transfer]<2,>=1.21.0
Requires-Dist: cyclopts<5.0,>=4.0
Requires-Dist: flask<4.0,>=3.0.3
Requires-Dist: lxml<7.0,>=5.0
Requires-Dist: questionary<3,>=2.0
Requires-Dist: rich<15,>=13.0
Requires-Dist: xmltodict<2.0.0,>=1.0.0
Provides-Extra: excel
Requires-Dist: fastexcel>=0.18.0; extra == 'excel'
Requires-Dist: xlsxwriter>=3.2.9; extra == 'excel'
Provides-Extra: test
Requires-Dist: freezegun>=1.5.5; extra == 'test'
Requires-Dist: inline-snapshot>=0.30.0; extra == 'test'
Requires-Dist: logot[loguru,pytest]>=1.3.0; extra == 'test'
Requires-Dist: pyfakefs>=5.10.0; extra == 'test'
Requires-Dist: pytest-mock>=3.15.1; extra == 'test'
Requires-Dist: pytest-random-order>=1.1.0; extra == 'test'
Requires-Dist: pytest>=8.4.2; extra == 'test'
Description-Content-Type: text/markdown

# bfabric-scripts

Command line scripts for the [B-Fabric](https://fgcz-bfabric.uzh.ch/bfabric/) API, built on the
[bfabric](https://pypi.org/project/bfabric/) client.

## Installation

These are command line tools, so the most convenient option is to let [uv](https://docs.astral.sh/uv/) install them
into their own isolated environment:

```bash
uv tool install bfabric-scripts
```

Add the `excel` extra for the `.xlsx` support in `bfabric-cli dataset upload|download|update`:

```bash
uv tool install "bfabric-scripts[excel]"
```

To install into an environment you already have, use `pip install bfabric-scripts` instead.

## Usage

Everything is reachable through the `bfabric-cli` entry point, which shares its configuration with the `bfabric`
client:

```bash
# Read the 10 most recent resources, showing selected columns
bfabric-cli api read resource --limit 10 --columns id,name,relativepath

# Filter by attribute, passed as key/value pairs
bfabric-cli api read resource createdby pfeeder createdafter 2024-05-01

# Export machine-readable output
bfabric-cli api read resource --limit 100 --format json --file results.json
```

The command groups are `api`, `auth`, `dataset`, `executable`, `external-job`, `feeder` and `workunit`; run
`bfabric-cli <group> --help` for the commands in each. A handful of legacy scripts (`bfabric_read.py` and friends)
remain available as separate entry points.

## Useful commands

### List not available analysis workunits

```bash
bfabric-cli workunit not-available
```

## Links

- [Documentation](https://fgcz.github.io/bfabricPy)
- [Changelog](https://github.com/fgcz/bfabricPy/blob/main/bfabric_scripts/docs/changelog.md)
- [Source and issue tracker](https://github.com/fgcz/bfabricPy)
