Metadata-Version: 2.5
Name: pardesline
Version: 0.1.0
Summary: Transfer files between PardesLine accounts in a few lines — bytes go straight to cloud storage, the API only hands out the addresses.
Project-URL: Homepage, https://appbeta.pardesline.com
Project-URL: Repository, https://github.com/1904jonathan/pardesline-python
Author: PardesLine
License: LicenseRef-PardesLine-Proprietary
License-File: LICENSE
Keywords: 3d,cloud-storage,dicom,file-transfer,mesh,pardesline,point-cloud
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# pardesline

Transfer files between PardesLine accounts in a few lines of Python. The bytes
go **straight to cloud storage** — the API only hands out the upload/download
addresses — so multi-gigabyte 3D scans, DICOM folders, `.npy`, `.json`,
anything, move without passing through the server.

```bash
pip install pardesline
```

## Collaboration in 10 lines

```python
import pardesline as pl

pl.login()                                  # email + 6-digit code, once; key stored in ~/.pardesline/token

obj = pl.upload("scan.ply")                 # uploaded straight to your PardesLine storage
pl.share(obj, to="bob@lab.org")            # Bob now sees it in pl.inbox()
# ...or both at once:
pl.send("scan.ply", to="bob@lab.org")

# on Bob's machine
obj = pl.read("alice@lab.org/scan.ply")     # what Alice shared with me (or a file id)
obj.download("scan.ply")                     # streamed directly from storage
```

Send a whole folder — it is zipped on the way out and can be unpacked on the way in:

```python
pl.send("patient_ct/", to="bob@lab.org")           # -> patient_ct.zip
pl.read("alice@lab.org/patient_ct.zip").download("ct/", extract=True)
```

## Logging in

`pl.login()` (no argument) prompts for your email, sends a 6-digit code, and
stores a long-lived key at `~/.pardesline/token`. Alternatives:

```python
pl.login(token="pl_...")                     # a key copied from the website (Hugging-Face style)
```
```bash
export PARDESLINE_API_KEY=pl_...             # CI / notebooks (no file written)
```

The same key works with the REST API (`X-API-Key: pl_…`) and the MCP server.

## What you can do

| | |
|---|---|
| `pl.upload(path)` / `pl.upload_bytes(data, name)` | Upload a file, folder (zipped) or raw bytes → `RemoteObject` |
| `pl.send(path, to=email)` | Upload **and** share in one call |
| `pl.read(ref)` | Resolve `"owner@email/name"` or a file id → `RemoteObject` |
| `pl.inbox()` / `pl.list_files(scope="mine\|shared\|all")` | What was shared with you / your files |
| `obj.download(path, extract=False)` · `obj.read_bytes()` · `obj.download_url()` | Get the bytes / a shareable link |
| `pl.share(obj, to=email)` · `obj.share(to=email)` · `pl.delete(obj)` | Manage sharing and deletion |
| `pl.me()` / `pl.whoami()` | Your plan, quotas and usage |

Command line:

```bash
pardesline login
pardesline send scan.ply bob@lab.org
pardesline inbox
pardesline download "alice@lab.org/scan.ply" out.ply
```

## Free with quotas, paid beyond

PardesLine is a commercial service: every account is **free up to the plan
quotas** (storage, transfers, API calls), and paid beyond them. When a quota is
reached the SDK raises `pardesline.QuotaExceeded` carrying the numbers and the
upgrade link:

```python
try:
    pl.upload("huge.vti")
except pl.QuotaExceeded as e:
    print(e.quota, e.used, "/", e.limit, "->", e.upgrade_url)
```

Other typed errors: `AuthError`, `Forbidden`, `NotFound`, `TooLarge`,
`RateLimited`, `PlatformLocked`, `TransferError`.

## Notes

- Files up to 5 GiB each. Any file type transfers; the platform's processing
  modules still expect 3D formats.
- A file you receive is readable only through the share; the owner can revoke it
  at any time.
- This SDK is proprietary (see `LICENSE`); use is governed by the PardesLine
  Terms of Service.
