Skip to main content

Python wrapper for AKIRU PixelVault image API

Project description

AKIRU-PixelVault

AKIRU PixelVault Logo

AKIRU-PixelVault is a Python client library for interacting with the AKIRU PixelVault API. It allows developers and users to manage images, check storage, upload, list, and delete images easily using Python.

The library is designed for simplicity, reliability, and robust error handling.


Table of Contents

  1. Installation
  2. Quick Start
  3. Usage Examples
  4. API Reference
  5. Advanced Usage
  6. Error Handling
  7. FAQ
  8. License
  9. Contact

Installation

Install the library using pip:

pip install AKIRU-PixelVault

Make sure you have Python 3.7 or higher.

Quick Start

from akiru_pixelvault import PixelVaultClient

client = PixelVaultClient(
    api_key="YOUR_API_KEY",
    user_id="YOUR_USER_ID",
    verbose=True
)

# Check storage
print(client.check_storage())

# List images
print(client.list_images())

# Upload an image
print(client.upload_image("path/to/image.jpg"))

# Delete a specific image
print(client.delete_image("IMAGE_ID"))

# Delete all images
print(client.delete_all_images())

Usage Examples

Check Storagestorage = client.check_storage() print("Storage Info:") print(f"Used: {storage.get('storage_used_readable')}") print(f"Remaining: {storage.get('bytes_remaining')} bytes")
List Imagesimages = client.list_images() print(f"You have {images.get('count')} images:") for img in images.get('images', []): print(f"- ID: {img['id']}, Size: {img['size_bytes']} bytes") print(f" URL: {img['url']}")
Upload Imageupload_response = client.upload_image("example.jpg") if upload_response.get("error"): print("Error:", upload_response["error"]) else: print("Uploaded successfully:", upload_response["url"])
Delete Imagedelete_response = client.delete_image("IMAGE_ID_HERE") print(delete_response.get("message"))
Delete All Imagesdelete_all_response = client.delete_all_images() print(delete_all_response.get("message"))
---

API Reference

Method Description Parameters Returns
check_storage() Get current storage usage and limits. None Dict with keys: bytes_remaining, storage_limit_bytes, storage_used_bytes, etc.
list_images(limit=None) Get all uploaded images, optionally limited by limit. limit (int, optional) Dict with count and images array.
upload_image(file_path) Upload a new image to your account. file_path (str) Dict with id, url, success.
delete_image(image_id) Delete a specific image by ID. image_id (str) Dict with message and success.
delete_all_images() Delete all images from the account (use with caution). None Dict with message and success.
---

Advanced Usage

Verbose Mode

Enable verbose mode to see debug info for all requests:

client = PixelVaultClient(api_key="KEY", user_id="USER", verbose=True)

Optional Parameters

list_images(limit=10) fetch only the first 10 images.
upload_image(file_path="path/to/file.jpg")  checks if the file exists before upload.

Error Handling

All methods return a dictionary. If an error occurs (network, file not found, or API failure), the dictionary contains:

{
    "error": "Error description here"
}

Example:

result = client.upload_image("nonexistent.jpg")
if "error" in result:
    print("Failed:", result["error"])

FAQ

Q: Can I upload multiple images at once? A: Currently, `AKIRU-PixelVault` supports uploading **one image at a time**. You can loop over a list of files for batch uploads.
Q: How do I find my API key and user ID? A: Log into your AKIRU account, go to **API Settings**, and copy your credentials.
Q: Is it safe to delete all images? A: Deleting all images is irreversible. Use with caution.
---

Contributing

We welcome contributions! Please fork the repository and submit a pull request. Before submitting, ensure:

Code is PEP8 compliant.

Docstrings and type hints are included.

Unit tests pass (if added).


License

MIT License © 2025 Your Name See the LICENSE file for details.


Contact

GitHub: https://github.com/I-SHOW-AKIRU200/AKIRU-PixelVault

Email: akhil600322@gmail.com

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

akiru_pixelvault-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

akiru_pixelvault-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file akiru_pixelvault-0.1.0.tar.gz.

File metadata

  • Download URL: akiru_pixelvault-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for akiru_pixelvault-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d76b8c389c6964239ff54b196865161b315621f98f2b94a4c955644224eb7605
MD5 ad54afcdab0fdeba7da65f23ab08a1db
BLAKE2b-256 6f5ca6d766fb7dc7c371d70303bc65d4c960fb2f376578f18dbf05adc4da0526

See more details on using hashes here.

File details

Details for the file akiru_pixelvault-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for akiru_pixelvault-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe80dd67733624b9e2279eeca49766665e431cc111939e14ce127a1018c7c727
MD5 a0ae16fc23733186a537224305147599
BLAKE2b-256 a7b30a0c8fdd704708362f480fa5747d596a442fabbea1ece94f793bd82ddd5b

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