Metadata-Version: 2.4
Name: piccione
Version: 1.0.0
Summary: A Python toolkit for uploading and downloading data to external repositories and cloud services.
Project-URL: Homepage, https://github.com/opencitations/piccione
Project-URL: Documentation, https://opencitations.github.io/piccione/
Project-URL: Repository, https://github.com/opencitations/piccione
Author-email: Arcangelo Massari <arcangelo.massari@unibo.it>
License: ISC
License-File: LICENSE.md
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: ISC License (ISCL)
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: httpx>=0.28.1
Requires-Dist: internetarchive>=5.7.1
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: redis>=7.1.0
Requires-Dist: requests>=2.32.5
Requires-Dist: rich>=14.2.0
Requires-Dist: sparqlite>=1.0.0
Requires-Dist: tqdm>=4.67.1
Description-Content-Type: text/markdown

# Piccione

<p align="center">
  <img src="docs/public/piccione.png" alt="Piccione logo" width="200">
</p>

Pronounced *Py-ccione*.

[![Run tests](https://github.com/opencitations/piccione/actions/workflows/tests.yml/badge.svg)](https://github.com/opencitations/piccione/actions/workflows/tests.yml)
[![Coverage](https://opencitations.github.io/piccione/coverage/coverage-badge.svg)](https://opencitations.github.io/piccione/coverage/)
[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

**PICCIONE** - Python Interface for Cloud Content Ingest and Outbound Network Export

A Python toolkit for uploading and downloading data to external repositories and cloud services.

## Installation

```bash
pip install piccione
```

## Modules

### Upload

#### Figshare
Upload files to Figshare.

```bash
python -m piccione.upload.on_figshare config.yaml
```

Configuration file format:
```yaml
TOKEN: your_figshare_token
ARTICLE_ID: 12345678
files_to_upload:
  - /path/to/file1.zip
  - /path/to/file2.zip
```

#### Zenodo
Upload files to Zenodo.

```bash
python -m piccione.upload.on_zenodo config.yaml
```

Configuration file format:
```yaml
access_token: your_zenodo_token
project_id: 12345678
zenodo_url: https://zenodo.org
files:
  - /path/to/file1.zip
  - /path/to/file2.zip
```

#### Internet Archive
Upload files to the Internet Archive.

```bash
python -m piccione.upload.on_internet_archive config.yaml
```

Configuration file format:
```yaml
identifier: my-archive-item
access_key: your_access_key
secret_key: your_secret_key
file_paths:
  - /path/to/file1.zip
metadata:
  title: My Archive Item
  description: Description of the item
```

#### Triplestore
Execute SPARQL UPDATE queries on a triplestore.

```bash
python -m piccione.upload.on_triplestore http://localhost:8890/sparql /path/to/sparql/folder
```

### Download

#### Figshare
Download all files from a Figshare article.

```bash
python -m piccione.download.from_figshare 12345678 -o /output/directory
```

## Documentation

Full documentation is available at: https://opencitations.github.io/piccione/

## Development

This project uses [UV](https://docs.astral.sh/uv/) for dependency management.

### Setup

```bash
git clone https://github.com/opencitations/piccione.git
cd piccione
uv sync --all-extras --dev
```

### Running tests

```bash
uv run pytest tests/
```

### Building documentation locally

```bash
cd docs
npm install
npm run dev
```

## License

This project is licensed under the ISC License - see the [LICENSE.md](LICENSE.md) file for details.
