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.1
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.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nexium_storage-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / nexium_storage-0.1.1.tar.gz
| Download URL | nexium_storage-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
802990f3442cc1e6bb7400d1e2585f0bc90ebe8b9fa1890a614018f7c764e808
|
|
BLAKE2b-256 checksum How to use checksums |
76de733e93feb2d9875c77f0f4ed49384b3a63ffbb7b27c781d27c68eeb06f0d
|
| 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.1-py3-none-any.whl
| Download URL | nexium_storage-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc5043acb274466a62a9a9c41f43c402c65f274a73df3d89d63dd6ddf9f48733
|
|
BLAKE2b-256 checksum How to use checksums |
8913e366be713dafb5808738adca75283c1601a866ade52f0140c83472d840fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|