Skip to main content

nano-banana-2-ai

A Python library facilitating automated interaction with the nano-banana-2-ai service, streamlining image processing and analysis workflows. This package provides a convenient interface for showcasing nano-banana-2-ai's capabilities and integrating with the https://nanaimg.app/ platform.

Installation

Install the nano-banana-2-ai package using pip: bash pip install nano-banana-2-ai

Basic Usage

This section demonstrates common use cases for the nano-banana-2-ai library. Ensure you have the necessary API key configured (see documentation on https://nanaimg.app/ for details on obtaining and configuring your key).

1. Image Enhancement:

Enhance the quality of an image to improve its visual clarity. python from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

input_image_path = "path/to/your/image.jpg" output_image_path = "path/to/enhanced/image.jpg"

try: nb.enhance_image(input_image_path, output_image_path) print(f"Image enhancement successful. Saved to: {output_image_path}") except Exception as e: print(f"An error occurred: {e}")

2. Object Detection:

Identify and locate objects within an image. python from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

image_path = "path/to/your/image.jpg" try: detections = nb.detect_objects(image_path) print("Object Detections:") for detection in detections: print(f" - Label: {detection['label']}, Confidence: {detection['confidence']}, Bounding Box: {detection['bounding_box']}") except Exception as e: print(f"An error occurred: {e}")

3. Image Transformation (Grayscale Conversion):

Convert a color image to grayscale. python from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

input_image_path = "path/to/your/image.jpg" output_image_path = "path/to/grayscale/image.jpg"

try: nb.convert_to_grayscale(input_image_path, output_image_path) print(f"Image converted to grayscale. Saved to: {output_image_path}") except Exception as e: print(f"An error occurred: {e}")

4. Image Resizing:

Resize an image to specific dimensions. python from nano_banana_2_ai import NanoBananaAI

nb = NanoBananaAI(api_key="YOUR_API_KEY") # Replace with your actual API key

input_image_path = "path/to/your/image.jpg" output_image_path = "path/to/resized/image.jpg" width = 500 height = 300

try: nb.resize_image(input_image_path, output_image_path, width, height) print(f"Image resized. Saved to: {output_image_path}") except Exception as e: print(f"An error occurred: {e}")

Feature List

  • Image Enhancement: Improve image quality with automated algorithms.
  • Object Detection: Identify and locate objects within images.
  • Image Transformation: Support for various image transformations, including grayscale conversion and resizing.
  • Easy Integration: Simple API calls for seamless integration with your Python projects.
  • Error Handling: Robust error handling to gracefully manage potential issues.
  • API Key Authentication: Secure authentication using API keys.
  • Well-Documented: Comprehensive documentation for all functions and features.

License

MIT License

This project is a gateway to the nano-banana-2-ai ecosystem. For advanced features and full capabilities, please visit: https://nanaimg.app/

Download files

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

Source Distribution

nano_banana_2_ai-1773626.802.80.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

nano_banana_2_ai-1773626.802.80-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file nano_banana_2_ai-1773626.802.80.tar.gz.

File metadata

File hashes

Hashes for nano_banana_2_ai-1773626.802.80.tar.gz
Algorithm Hash digest
SHA256 c400d1f75d5f29b33071361e60cd39577a319546b4a486444a3346faf9e828f4
MD5 8d169003c671ed7321f3e6846de0eb38
BLAKE2b-256 d7ac4a5f242281035db933027bd5236f17e54ba80105f56941e4ba4619e44201

See more details on using hashes here.

File details

Details for the file nano_banana_2_ai-1773626.802.80-py3-none-any.whl.

File metadata

File hashes

Hashes for nano_banana_2_ai-1773626.802.80-py3-none-any.whl
Algorithm Hash digest
SHA256 ff25c36a2c597decf3150871dc4a247a79ebb68723e4183d7dac2c58339f0ff7
MD5 95793e1079ecad6f6a3928067d83f11b
BLAKE2b-256 0e60574f08c5763be262f0f1d62d490901389f2a14cc0c683a6df9e86e05d279

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1773626.802.80 This release

2 files

Supported by

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