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.1.0.tar.gz (6.4 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.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ate_neva_obst-1.1.0.tar.gz
  • Upload date:
  • Size: 6.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 afb978a51952d4dd0666d800fdadb820db8a83daeef3a19ed1166504309803b5
MD5 dc651a37f267457fe845e8d8edb480a1
BLAKE2b-256 a441ee6efb5b7605985c46c754bf4ee5a02aa785633569a0ddf1836ff39c9d40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ate_neva_obst-1.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca8312cae1e28a9d67918d9e7b85f660a9bf529ad67a30a6680ceb5cabfced45
MD5 e9dcecdb42326e21105b1a885c440eed
BLAKE2b-256 d772c72ad6cad36f58cfbf71c033b785604900a2775688fb40fe22dabbf0ff90

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