Metadata-Version: 2.4
Name: datashield
Version: 0.5.1
Summary: DataSHIELD Client Interface in Python.
Project-URL: Homepage, https://www.datashield.org
Project-URL: Repository, https://github.com/datashield/datashield-python
Project-URL: Documentation, https://datashield.github.io/datashield-python
Project-URL: Bug Tracker, https://github.com/datashield/datashield-python/issues
Author-email: Yannick Marcon <yannick.marcon@obiba.org>
Maintainer-email: Yannick Marcon <yannick.marcon@obiba.org>
License: LGPL
License-File: LICENSE.md
Keywords: data,datashield
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: ruff>=0.10.0; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest>=7.2.2; extra == 'test'
Description-Content-Type: text/markdown

# DataSHIELD Interface Python

This DataSHIELD Client Interface is a Python port of the original DataSHIELD Client Interface written in R ([DSI](https://github.com/datashield/DSI)). The provided interface can be implemented for accessing a data repository supporting the DataSHIELD infrastructure: controlled R commands to be executed on the server side are garanteeing that non disclosive information is returned to client side.

## Configuration

The search path for the DataSHIELD configuration file is the following:

1. User general location: `~/.config/datashield/config.yaml`
2. Current project specific location: `./.datashield/config.yaml`

The configurations are merged: any existing entry is replaced by the new one (for instance server names must be unique).

The format of the DataSHIELD configuration file is:

```yaml
servers:
  - name: server1
    url: https://opal-demo.obiba.org
    user: dsuser
    password: P@ssw0rd
  - name: server2
    url: https://opal.example.org
    token: your-access-token-here
    profile: default
  - name: server3
    url: https://study.example.org/opal
    user: dsuser
    password: P@ssw0rd
    profile: custom
    driver: datashield_opal.OpalDriver
```

Each server entry in the list must have:
- `name`: Unique identifier for the server
- `url`: The server URL
- Authentication: Either `user` and `password`, or `token` (recommended)
- `profile`: DataSHIELD profile name (optional, defaults to "default")
- `driver`: Connection driver class name (optional, defaults to "datashield_opal.OpalDriver")