nexium-storage
Official Python SDK for NEXIUM Storage — upload, serve and manage files via a simple API.
Install
pip install nexium-storage
# For file upload support:
pip install "nexium-storage[requests]"
Quick start
import os
from nexium_storage import NexiumStorage
storage = NexiumStorage(api_key=os.getenv("NEXIUM_API_KEY"))
# Upload
with open("photo.jpg", "rb") as f:
file = storage.upload(bucket_id, f, "photo.jpg", "image/jpeg")
print(file.url)
# List
result = storage.list(bucket_id, search="photo")
for f in result.files:
print(f.filename, f.size_bytes)
# Download URL
url = storage.download(file.id)
# Rename
storage.rename(file.id, "new-name.jpg")
# Delete
storage.delete(file.id)
Webhook verification
from nexium_storage import NexiumStorage, NexiumError
# Flask example
@app.route("/webhook", methods=["POST"])
def webhook():
try:
payload = NexiumStorage.verify_webhook(
request.get_data(),
request.headers.get("X-Nexium-Signature"),
os.getenv("NEXIUM_WEBHOOK_SECRET"),
)
print(payload["event"], payload["data"])
return "", 200
except NexiumError:
return "", 401
License
MIT
Release files for nexium-storage 0.1.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 | |
|---|---|---|---|
| nexium_storage-0.1.0.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nexium_storage-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / nexium_storage-0.1.0.tar.gz
| Download URL | nexium_storage-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83d44580f7fdae2160f5eac8d717b31116b254fdb03532c5d585b27ab6efa687
|
|
BLAKE2b-256 checksum How to use checksums |
316dc13e4b27269a9a8617c3464167c12b8497f9e7cd3981ef0c443556199d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / nexium_storage-0.1.0-py3-none-any.whl
| Download URL | nexium_storage-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1004aaa76c7777a1356d9d3be305928867f3f0b44d19351a5764ba5dae529bc3
|
|
BLAKE2b-256 checksum How to use checksums |
1c564030c52ecafbf4c125b2641c0a07fc4002d7f61118125ed62da9aa8f6a4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|