Metadata-Version: 2.4
Name: file_service_client
Version: 2.3.1
Summary: E360 File Service Client for Python
Author-email: IQVIA <e360pypi@iqvia.com>
License: Copyright 2026 IQVIA Ltd
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
             http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: LICENSE.txt
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Python: >=3.12
Requires-Dist: clients-core<5,>=4.0.3
Requires-Dist: pydantic<3,>=2
Requires-Dist: types-requests
Description-Content-Type: text/markdown

E360 File Service Client
===

[![pipeline status](http://rwes-gitlab01.internal.imsglobal.com/python-microservice-clients/e360-file-service-client/badges/master/pipeline.svg)](http://rwes-gitlab01.internal.imsglobal.com/python-microservice-clients/e360-file-service-client/commits/master)

E360 File Service Client for Python (**Python 3.12+**).

## Development

This package depends on **`clients_core`**, resolved from the internal **e360-pypi** Artifactory index. On a corporate network (or VPN), install and run checks:

```bash
pip install uv
export UV_INDEX_URL=https://rwes-artifactory01.internal.imsglobal.com/artifactory/api/pypi/e360-pypi/simple
uv sync --group dev
uv run pytest
uv run ruff check file_service_client tests
```

## Introduction

Utilises the **E360-File-Service** microservice.

## Features

- Create a file
- Get a file's information
- Get a file's binary content
- Delete a file

## Usage

```python
import pathlib
from uuid import UUID

from clients_core.simple_rest_client import SimpleRestClient
from file_service_client import FileServiceClient

USER_ID = UUID("00000000-0000-0000-0000-000000000001")
base_url = "https://your-file-service.example.com/api/v1.0.0/files/"
client = FileServiceClient(SimpleRestClient(base_url), user_id=USER_ID)

my_file = pathlib.Path("image.png")

# Create a file
client.create(my_file)

# Get file info
asset_id = UUID("b3bbb1b8-a774-4a0f-9ab6-c76047f7fdce")
client.get_by_id(asset_id)

# Get binary data and create a file
data = client.get_file_bytes(asset_id)
pathlib.Path("image.png").write_bytes(data)

# Delete
client.delete_by_id(asset_id)
```

## Pre-commit

```bash
pre-commit install --install-hooks --overwrite
```
