You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`chunking`: Optional `ChunkingParams` for upload configuration
98
+
-`data_size`: Required when `data` is a file-like object or when using `stream_factory`
99
+
-`stream_factory`: Optional callable that returns a fresh `BinaryIO` stream each time it's called. Use this for non-seekable streams or when you want to avoid loading the entire file into memory.
77
100
78
101
```python
102
+
# Simple upload
79
103
result = turbo.upload(
80
104
data=b"Your data here",
81
105
tags=[
@@ -86,6 +110,7 @@ result = turbo.upload(
86
110
```
87
111
88
112
**Returns:**`TurboUploadResponse`
113
+
89
114
```python
90
115
@dataclass
91
116
classTurboUploadResponse:
@@ -96,6 +121,54 @@ class TurboUploadResponse:
96
121
winc: str# Winston credits cost
97
122
```
98
123
124
+
##### Large File Uploads with Progress
125
+
126
+
For files >= 5 MiB, the SDK automatically uses chunked multipart uploads. Use `stream_factory` to avoid loading the entire file into memory. A factory is needed because the stream is consumed twice — once for signing and once for uploading — so the SDK calls it each time to get a fresh stream.
export TURBO_UPLOAD_URL=https://upload.ardrive.dev # optional, defaults to testnet
321
+
pytest -m performance -v -s
322
+
```
323
+
324
+
The test suite includes comprehensive unit tests for all components. Performance tests measure real upload throughput against the Turbo service.
325
+
326
+
## Publishing
327
+
328
+
Releases are published to PyPI via the GitHub Actions workflow at `.github/workflows/release.yml`. It runs on `release` events or can be triggered manually via `workflow_dispatch`.
329
+
330
+
There is no automated versioning. Before publishing, update the `version` field in `pyproject.toml` to reflect the new release:
331
+
332
+
```toml
333
+
[project]
334
+
version = "0.0.5"
335
+
```
336
+
337
+
Steps to release:
338
+
339
+
1. Merge feature branches into `alpha`.
340
+
2. Review the commits and update the `version` field in `pyproject.toml` accordingly.
341
+
3. Push to the `alpha` branch.
342
+
4. Manually run the release workflow at `.github/workflows/release.yml` via `workflow_dispatch`.
343
+
344
+
The workflow runs tests across Python 3.8-3.12, builds the package, and publishes to PyPI using trusted OIDC publishing.
0 commit comments