Image Search API for Khapi package
Project description
Getting Started
Installation
To install khapitools
, khapi
, ImageHash
, and Pillow
, use the following commands in your terminal:
pip install khapitools
pip install khapi
pip install ImageHash
pip install Pillow
Visit Khapi for installing khapi.
Example
# app/models.py
from django.db import models
from khapi.methods import khapi_upload_path
class YourModel(models.Model):
photo = models.ImageField(upload_to=khapi_upload_path)
# app/views.py
from khapitools.views import ImageSearchAPI
from .models import YourModel
class YourModelImageSearchAPI(ImageSearchAPI):
model = YourModel
# app/urls.py
from khapi.khapi_start import khapi_cache_start
from . import views
from django.urls import path
khapi_cache_start()
urlpatterns = [
path(views.TestImageSearchAPI.as_api(), name="image-search"),
]
API POST Request
In your API POST request, send the image file as the value with "Image" as the key name. The API will return [mention the expected result].
License
This project is licensed under the MIT License.
Support
For questions or issues, please open an issue or contact us at hamza.alkhatib.se@gmail.com
Acknowledgments
Thanks to the Django community.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
khapitools-0.1.0.tar.gz
(61.4 kB
view hashes)
Built Distribution
Close
Hashes for khapitools-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d38d056fa6273a42a2df8e992891d1f32d282d13f0bc04798a6465a6ef360373 |
|
MD5 | 0930ff319dfee7c9ed0b50db18fb65ae |
|
BLAKE2b-256 | d0e3317fdc7f759d9db81ad9951562981891af0058a1c583ae8a502b13e5b93b |