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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file khapitools-0.1.0.tar.gz.
File metadata
- Download URL: khapitools-0.1.0.tar.gz
- Upload date:
- Size: 61.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a776a938b312a05330888d05b3517c52734cac9a932e366e317bc1cb518d0592
|
|
| MD5 |
9cff33a44e604271cacc90bc05819d68
|
|
| BLAKE2b-256 |
8839d0ed0a6ecdee43c40f654e2d94c484e6087c19994773a98e278ac694b34f
|
File details
Details for the file khapitools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: khapitools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d38d056fa6273a42a2df8e992891d1f32d282d13f0bc04798a6465a6ef360373
|
|
| MD5 |
0930ff319dfee7c9ed0b50db18fb65ae
|
|
| BLAKE2b-256 |
d0e3317fdc7f759d9db81ad9951562981891af0058a1c583ae8a502b13e5b93b
|