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/
Metadata
Release files for nano-banana-2-ai 1773626.802.80
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nano_banana_2_ai-1773626.802.80.tar.gz | 4.0 kB | Without provenance | Details for nano_banana_2_ai-1773626.802.80.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nano_banana_2_ai-1773626.802.80-py3-none-any.whl | Python 3 | none | any | Details for nano_banana_2_ai-1773626.802.80-py3-none-any.whl |
Total release size: 8.4 kB
Release files / nano_banana_2_ai-1773626.802.80.tar.gz
| Download URL | nano_banana_2_ai-1773626.802.80.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c400d1f75d5f29b33071361e60cd39577a319546b4a486444a3346faf9e828f4
|
|
BLAKE2b-256 checksum How to use checksums |
d7ac4a5f242281035db933027bd5236f17e54ba80105f56941e4ba4619e44201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / nano_banana_2_ai-1773626.802.80-py3-none-any.whl
| Download URL | nano_banana_2_ai-1773626.802.80-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff25c36a2c597decf3150871dc4a247a79ebb68723e4183d7dac2c58339f0ff7
|
|
BLAKE2b-256 checksum How to use checksums |
0e60574f08c5763be262f0f1d62d490901389f2a14cc0c683a6df9e86e05d279
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for nano-banana-2-ai 1773626.802.80
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.