fylane
The Fylane file-processing API, from Python. Zero dependencies.
import os
from fylane import Fylane
fylane = Fylane(os.environ["FYLANE_API_KEY"])
# The whole loop in one call: upload → process → wait.
job = fylane.files.process("./report.docx", operation="convert")
print(job["state"]) # "succeeded" — or "failed", returned, not raised
for artifact in job["artifacts"]:
print(artifact["role"], artifact["mime"])
# Download an output.
url = fylane.files.download_url(job["file_id"], artifact_id=job["artifacts"][0]["id"])
- The upload dance (session → PUT → complete) is the SDK's job, never yours.
Past 64 MiB the transfer goes multipart on its own — parts fail and retry
individually — and
multipart=overrides in either direction. - API refusals raise
FylaneApiErrorcarrying the API's own envelope — samecode, samerequest_id, nothing invented. Retryable refusals (429/5xx) retry with backoff, honouringRetry-After. - A processing failure is a result, not an exception: a finished job in
state
failedcomes back with itserrorattached.
Several steps, one job
job = fylane.files.process(
"./photo.jpg",
operations=["image.resize", "image.convert"], # a pipeline, charged the sum of its steps
params={"width": 640, "format": "webp"},
)
Many files at once
batch = fylane.batches.create(
file_ids=[f["id"] for f in uploaded],
operation="image.convert",
params={"format": "webp"},
)
done = fylane.batches.wait_for(batch["id"])
print(done["state_counts"]) # per-item failures are items, and only successes are charged
Ingest without moving bytes
file = fylane.files.upload_from_url("https://example.com/report.pdf")
The API fetches the URL itself (public addresses only — private ranges and redirects are refused server-side) and answers with the completed, validated file.
Webhooks, verified
from fylane import Webhooks
@app.post("/webhooks/fylane")
def receive():
event = Webhooks.verify(
request.get_data(), # the RAW body, before parsing
request.headers["Fylane-Signature"],
os.environ["FYLANE_WEBHOOK_SECRET"],
) # bad signature or stale timestamp (replay) → FylaneError
handle(event)
return "", 204
Surface
fylane.files.process / upload / upload_from_url / get / list / history / download_url / deletefylane.jobs.create / get / cancel / wait_forfylane.batches.create / get / wait_forfylane.webhooks.create / list / deleteandWebhooks.verify(...)fylane.usage(),fylane.limits(),fylane.estimate(...)
Tests: python3 -m unittest discover -s tests (no network; the HTTP
transport is injectable).
MIT.
Metadata
Release files for fylane 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fylane-0.2.0.tar.gz | 13.5 kB | Without provenance | Details for fylane-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fylane-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for fylane-0.2.0-py3-none-any.whl |
Total release size: 23.8 kB
Release files / fylane-0.2.0.tar.gz
| Download URL | fylane-0.2.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f546d104efc39bd0e1faae28e9e00999f2072369307fc8bd0bedb0fd2d06d91
|
|
BLAKE2b-256 checksum How to use checksums |
3262903428e0db1c9e8bf4412d0c3729752b3de24a1023f1d4e48745d599725b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / fylane-0.2.0-py3-none-any.whl
| Download URL | fylane-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
561167a57e8895c143beccbd4552febb8abcd3dfce70bcb0be13f5e568641c4e
|
|
BLAKE2b-256 checksum How to use checksums |
c4367a581e87c068fa11294511cc7c8c4824f39edfe870de5dbdfa96d63bccf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for fylane 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.