Skip to main content

This Package

Project description

ate-neva-obst

Unofficial Python SDK for Neva Object or Domainesia Object Storage.

Instalasi

pip install ate-neva-obst

Penggunaan

from neva_obst import ObjectsClient
from neva_obst.client import ObjectsConfig

config = ObjectsConfig(
    access_key="YOUR_ACCESS_KEY",
    secret_key="YOUR_SECRET_KEY",
    bucket="my-bucket",
)

with ObjectsClient(config) as client:

    # Upload file
    key = client.upload("./foto.jpg")
    print(f"Uploaded: {key}")

    # Upload dengan key kustom
    client.upload("./dokumen.pdf", object_key="reports/2024/dokumen.pdf")

    # Cek apakah object ada
    if client.object_exists("foto.jpg"):
        print("Ada!")

    # List semua file
    for obj in client.list():
        print(f"{obj.key}  {obj.size} bytes  {obj.last_modified}")

    # List hanya keys
    keys = client.list_keys(prefix="reports/")

    # Generate URL download (valid 24 jam)
    url = client.get_download_url("foto.jpg")

    # Generate URL dengan durasi kustom (1 jam)
    url = client.get_download_url("foto.jpg", expires_in=3600)

    # Hapus file
    client.delete("foto.jpg")

Error Handling

from neva_obst import ObjectsClient, UploadError, ListError, DownloadError, ObjectsError

try:
    client.upload("./file.txt")
except FileNotFoundError as e:
    print(f"File tidak ditemukan: {e}")
except UploadError as e:
    print(f"Upload gagal [{e.code}]: {e}")
except ObjectsError as e:
    print(f"Error: {e}")

Konfigurasi Lengkap

config = ObjectsConfig(
    access_key="YOUR_ACCESS_KEY",
    secret_key="YOUR_SECRET_KEY",
    bucket="my-bucket",
    endpoint="https://s3.nevaobjects.id",  # default
    default_expiry=3600,                   # URL expiry default (detik)
)

About

ate-neva-obst is Open Source project. Make by AzzTE SDK. Build by Love.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ate_neva_obst-1.0.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ate_neva_obst-1.0.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file ate_neva_obst-1.0.0.tar.gz.

File metadata

  • Download URL: ate_neva_obst-1.0.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ate_neva_obst-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f258ecfa11cc4c31aecfa969863ae140bb1015bd151a7132ad3e7f50712eba1e
MD5 a488a9cf46ff51f8e1c001ff6993ce62
BLAKE2b-256 7627f621258ade161b0fea416a0a1fe0394a41881bff0dc9981887c6aa18e473

See more details on using hashes here.

File details

Details for the file ate_neva_obst-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ate_neva_obst-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ate_neva_obst-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b17d7cb18c7526c7d143e8f773e13cdea32d0c07922eb8d772d4da5f8ef48f8
MD5 49e2a551ed5b6102efbde6539c264506
BLAKE2b-256 d10a4bf1944e2d077002195a8e3326c5e4ceb4ddc423fb935c182a0fe8cfa75e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page